Re: history file on replica and double switchover

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Grigory Smolkin <g(dot)smolkin(at)postgrespro(dot)ru>, David Zhang <david(dot)zhang(at)highgo(dot)ca>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: history file on replica and double switchover
Date: 2020-09-25 19:05:00
Message-ID: ef405976-3e6d-8f67-4845-8d78a5947f12@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020/09/26 2:58, Grigory Smolkin wrote:
> Fujii Masao, David Zhang, Anastasia Lubennikova, many thanks to you for efforts with this patch!
> Can I mark it as ready for committer?

Ok, but I attached the updated version of the patch. It's helpful if you review that.

In the latest patch, I changed walreceiver so that it creates .done file for the streamed timeline history file when archive_mode is NOT "always".

Walreceiver does the same thing for the streamed WAL files to prevent them from being archived later. Without this, the streamed WAL files can exist in pg_wal without any archive status files, and then they will be archived later accidentally because of lack of archive status.

OTOH, timeline history files will not be archived later even without archive status files. So there is no strong reason to make walreceiver create .doen file for the timeline history files. But at least for me it's strange to keep the file in pg_wal without archive status. So for now I'm just inclined to create .done files.... Thought?

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachment Content-Type Size
history_replica_v4.patch text/plain 1.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2020-09-25 19:13:15 Re: scram-sha-256 broken with FIPS and OpenSSL 1.0.2
Previous Message Andrey Lepikhov 2020-09-25 18:34:04 Re: Asynchronous Append on postgres_fdw nodes.