pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Archive timeline history files in standby if archive_mode is set
Date: Tue, 29 Sep 2020 07:27:12 +0000
Message-ID: <E1kNA2a-0001Gu-Ng@gemulon.postgresql.org> (raw)

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

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4d342b9d41533df94b1b637d814333a716ec1050

Modified Files
--------------
doc/src/sgml/high-availability.sgml   | 3 ++-
src/backend/replication/walreceiver.c | 9 +++++++++
2 files changed, 11 insertions(+), 1 deletion(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1kNA2a-0001Gu-Ng@gemulon.postgresql.org>
Permalink:  ../E1kNA2a-0001Gu-Ng@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kNA2a-0001Gu-Ng@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org
  Subject: Re: pgsql: Archive timeline history files in standby if archive_mode is set
  In-Reply-To: <E1kNA2a-0001Gu-Ng@gemulon.postgresql.org>
  References: <E1kNA2a-0001Gu-Ng@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox