Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

David Steele <david@pgmasters.net>

From: David Steele <david@pgmasters.net>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, michael@paquier.xyz
Cc: pgsql-hackers@lists.postgresql.org, zxwsbg12138@gmail.com, david.zhang@highgo.ca
Date: 2023-09-28T20:23:42Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Delay recovery mode LOG after reading backup_label and/or checkpoint record

  2. Mention standby.signal in FATALs for checkpoint record missing at recovery

  3. XLOG file archiving and point-in-time recovery. There are still some

On 9/27/23 23:58, Kyotaro Horiguchi wrote:
> At Fri, 10 Mar 2023 15:59:04 +0900, Michael Paquier <michael@paquier.xyz> wrote in
>> My apologies for the long message, but this deserves some attention,
>> IMHO.
>>
>> So, any thoughts?
> 
> Sorry for being late. However, I agree with David's concern regarding
> the unnecessary inconvenience it introduces.  I'd like to maintain the
> functionality.

After some playing around, I find I agree with Michael on this, i.e. 
require at least standby.signal when a backup_label is present.

According to my testing, you can preserve the "independent server" 
functionality by setting archive_command = /bin/false. In this case the 
timeline is not advanced and recovery proceeds from whatever is 
available in pg_wal.

I think this type of recovery from a backup label without a timeline 
change should absolutely be the exception, not the default as it seems 
to be now. If the server is truly independent, then the timeline change 
is not important. If the server is not independent, then the timeline 
change is critical.

So overall, +1 for Michael's patch, though I have only read through it 
and not tested it yet.

One comment, though, if we are going to require recovery.signal when 
backup_label is present, should it just be implied? Why error and force 
the user to create it?

Regards,
-David