Search Postgresql Archives

recovery_target_time and WAL fetch with streaming replication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,


what is Postgresql's strategy when to fetch WAL from the master while in streaming replication, and could it be tweaked?

I'm using a physical streaming replication slave to have a database lagging behind about one month behind the primary, by setting "recovery_target_time" to the desired point in time. This setting is periodically advanced by a cronjob to allow the replica to roll forward. It's a 10.3-1 install on Debian.


It seems that as soon as the slave needs new WAL data to reach the requested target time, it will connect to the primary and fetch /all/ new WAL the primary has available for the slave's slot - up to "now", ignoring the recovery_target_time.

So in my setup, the slave will connect to the primary once per month, and download the whole next month's WAL data at once.

I do not care on which instance WAL is kept until needed, but I'd really prefer if the transfer (and disk space requirement!) would be more evenly distributed.


One option of course would be to use some transfer mechanism external to Postgresql... but so far I'm thinking there must be any easier way?



Thanks & best regards,

	-hannes




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux