]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Archive timeline history files in standby if archive_mode is set to "always".
authorFujii Masao <fujii@postgresql.org>
Tue, 29 Sep 2020 07:21:46 +0000 (16:21 +0900)
committerFujii Masao <fujii@postgresql.org>
Tue, 29 Sep 2020 07:25:08 +0000 (16:25 +0900)
commit33441753820b4695523ce29ddec0465d6552f087
tree63ed27eb9adced32b2b50d007d34daee5bd930a7
parentde6725debd00504fa71a43f718acb26bb045b07f
Archive timeline history files in standby if archive_mode is set to "always".

Previously the standby server didn't archive timeline history files
streamed from the primary even when archive_mode is set to "always",
while it archives the streamed WAL files. This could cause the PITR to
fail because there was no required timeline history file in the archive.
The cause of this issue was that walreceiver didn't mark those files as
ready for archiving.

This commit makes walreceiver mark those streamed timeline history
files as ready for archiving if archive_mode=always. Then the archiver
process archives the marked timeline history files.

Back-patch to all supported versions.

Reported-by: Grigory Smolkin
Author: Grigory Smolkin, Fujii Masao
Reviewed-by: David Zhang, Anastasia Lubennikova
Discussion: https://postgr.es/m/54b059d4-2b48-13a4-6f43-95a087c92367@postgrespro.ru
doc/src/sgml/high-availability.sgml
src/backend/replication/walreceiver.c