Re: Possible missing segments in archiving on standby - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Possible missing segments in archiving on standby
Date
Msg-id a616c7d4-a6b7-4643-55f8-234f3832492c@oss.nttdata.com
Whole thread Raw
In response to Re: Possible missing segments in archiving on standby  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: Possible missing segments in archiving on standby
List pgsql-hackers

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

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Non-decimal integer literals
Next
From: Amul Sul
Date:
Subject: Re: [Patch] ALTER SYSTEM READ ONLY