Use of backup_label not noted in log - Mailing list pgsql-hackers

From Andres Freund
Subject Use of backup_label not noted in log
Date
Msg-id 20231117041811.vz4vgkthwjnwp2pp@awork3.anarazel.de
Whole thread Raw
Responses Re: Use of backup_label not noted in log
Re: Use of backup_label not noted in log
List pgsql-hackers
Hi,

I've often had to analyze what caused corruption in PG instances, where the
symptoms match not having had backup_label in place when bringing on the
node. However that's surprisingly hard - the only log messages that indicate
use of backup_label are at DEBUG1.

Given how crucial use of backup_label is and how frequently people do get it
wrong, I think we should add a LOG message - it's not like use of backup_label
is a frequent thing in the life of a postgres instance and is going to swamp
the log.  And I think we should backpatch that addition.

Medium term I think we should go further, and leave evidence in pg_control
about the last use of ControlFile->backupStartPoint, instead of resetting it.

I realize that there's a discussion about removing backup_label - but I think
that's fairly orthogonal. Should we go with the pg_control approach, we should
still emit a useful message when starting in a state that's "equivalent" to
having used the backup_label.

Thoughts?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Wrong rows estimations with joins of CTEs slows queries by more than factor 500
Next
From: Ajin Cherian
Date:
Subject: Re: Synchronizing slots from primary to standby