Re: Possible missing segments in archiving on standby
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-09-08T13:41:43Z
Lists: pgsql-hackers
Attachments
- XLogArchiveCheckDone_walfile_xlog_switch.patch (text/plain) patch
- walreceiver_notify_archive_soon_v5_pg10.patch (text/plain) patch v5
- walreceiver_notify_archive_soon_v5_pg12-11.patch (text/plain) patch v5
- walreceiver_notify_archive_soon_v5_pg14-13.patch (text/plain) patch v5
- walreceiver_notify_archive_soon_v5_pg96.patch (text/plain) patch v5
- walreceiver_notify_archive_soon_v5.patch (text/plain) patch v5
On 2021/09/08 16:40, Kyotaro Horiguchi wrote: > No. The discussion taken there is not about permanently missing .ready > files, but about .ready files created out-of-order. So I don't think > the outcome from the thread does *fix* this issue. Hmm... > I don't think we want such extent of perfectness at all for the case > where some archive-related parameters are changed after a > crash. Anyway we need to take a backup after that and at least all > segments required for the backup will be properly archived. The > segments up to the XLOG_SWITCH segment are harmless garbage, or a bit > of food for disk. So probably we reached the consensus that something like the attached patch (XLogArchiveCheckDone_walfile_xlog_switch.patch) is enough for the corner case where walreceiver fails to create .ready file of WAL file including XLOG_SWITCH? > Sounds convincing. Ok, I agree to that. So barring any objection, I will commit the patch and back-patch it to all supported version. walreceiver_notify_archive_soon_v5.patch walreceiver_notify_archive_soon_v5_pg14-13.patch walreceiver_notify_archive_soon_v5_pg12-11.patch walreceiver_notify_archive_soon_v5_pg10.patch walreceiver_notify_archive_soon_v5_pg96.patch Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
Commits
-
Fix issue with WAL archiving in standby.
- 61e2aa2dbe55 9.6.24 landed
- f77489046d17 10.19 landed
- aacb3cfaf5e8 11.14 landed
- 4665352543d7 12.9 landed
- dd9b3fced83e 13.5 landed
- b5ec22bf5e8f 14.0 landed
- 596ba75cb111 15.0 landed