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

David Zhang <david.zhang@highgo.ca>

From: David Zhang <david.zhang@highgo.ca>
To: Michael Paquier <michael@paquier.xyz>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-07-14T20:32:49Z
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

I believe before users can make a backup using pg_basebackup and then 
start the backup as an independent Primary server for whatever reasons. 
Now, if this is still allowed, then users need to be aware that the 
backup_label must be manually deleted, otherwise, the backup won't be 
able to start as a Primary.

The current message below doesn't provide such a hint.

+		if (!ArchiveRecoveryRequested)
+			ereport(FATAL,
+					(errmsg("could not find recovery.signal or standby.signal when recovering with backup_label"),
+					 errhint("If you are restoring from a backup, touch \"%s/recovery.signal\" or \"%s/standby.signal\" and add required recovery options.",
+							 DataDir, DataDir)));

On 2023-03-12 6:06 p.m., Michael Paquier wrote:
> On Fri, Mar 10, 2023 at 03:59:04PM +0900, Michael Paquier wrote:
>> My apologies for the long message, but this deserves some attention,
>> IMHO.
> Note: A CF entry has been added as of [1], and I have added an item in
> the list of live issues on the open item page for 16.
>
> [1]:https://commitfest.postgresql.org/43/4244/
> [2]:https://wiki.postgresql.org/wiki/PostgreSQL_16_Open_Items#Live_issues
> --
> Michael

Best regards,

David