Re: Use of backup_label not noted in log

From: David Steele <david(at)pgmasters(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Subject: Re: Use of backup_label not noted in log
Date: 2023-11-20 19:08:15
Message-ID: e0e6e722-e85e-4e2e-8be7-952785519090@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/20/23 14:27, Andres Freund wrote:
> Hi,
>
> On 2023-11-19 14:28:12 -0400, David Steele wrote:
>> On 11/18/23 17:49, Andres Freund wrote:
>>> On 2023-11-18 10:01:42 -0800, Andres Freund wrote:
>>> Not enamored with the phrasing of the log messages, but here's a prototype:
>>>
>>> When starting up with backup_label present:
>>> LOG: starting from base backup with redo LSN A/34100028, checkpoint LSN A/34100080 on timeline ID 1
>>
>> I'd prefer something like:
>>
>> LOG: starting backup recovery with redo...
>
>>> When restarting before reaching the end of the backup, but after backup_label
>>> has been removed:
>>> LOG: continuing to start from base backup with redo LSN A/34100028
>>> LOG: entering standby mode
>>> LOG: redo starts at A/3954B958
>>
>> And here:
>>
>> LOG: restarting backup recovery with redo...
>
> I like it.

Cool.

>>> I've wondered whether it's worth also adding an explicit message just after
>>> ReachedEndOfBackup(), but it seems far less urgent due to the existing
>>> "consistent recovery state reached at %X/%X" message.
>>
>> I think the current message is sufficient, but what do you have in mind?
>
> Well, the consistency message is emitted after every restart. Whereas a single
> instance only should go through backup recovery once. So it seems worthwhile
> to differentiate the two in log messages.

Ah, right. That works for me, then.

Regards,
-David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-11-20 19:10:34 Re: trying again to get incremental backup
Previous Message Andres Freund 2023-11-20 19:03:28 Re: Use of backup_label not noted in log