Re: history file on replica and double switchover
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Grigory Smolkin <g.smolkin@postgrespro.ru>,
David Zhang <david.zhang@highgo.ca>,
Anastasia Lubennikova <a.lubennikova@postgrespro.ru>,
Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-25T19:05:00Z
Lists: pgsql-hackers
Attachments
- history_replica_v4.patch (text/plain) patch v4
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
Commits
-
Archive timeline history files in standby if archive_mode is set to "always".
- 40a8fb1e0f41 9.5.24 landed
- 7be02a3bf03a 9.6.20 landed
- 33441753820b 10.15 landed
- 462ff7966997 11.10 landed
- 4d342b9d4153 12.5 landed
- 059caf36c307 13.1 landed
- fd26f7823183 14.0 landed