Re: Fix logging for invalid recovery timeline

2025-02-25 Thread Michael Paquier
On Tue, Feb 25, 2025 at 04:25:40PM +, David Steele wrote: > On 2/25/25 04:07, Benoit Lobréau wrote: >> Thank you Michael and David. >> I never paid attention to thoses... Don't worry about that. There is a lot of Postgres-ism in this code base, and we all keep learning stuff :D > This looks

Re: Fix logging for invalid recovery timeline

2025-02-25 Thread David Steele
On 2/25/25 04:07, Benoit Lobréau wrote: On 2/24/25 11:33 PM, Michael Paquier wrote: On Mon, Feb 24, 2025 at 05:30:35PM +, David Steele wrote: +    /* translator: %s is a backup_label or pg_control file */ See for example PostmasterMain() with the "/* translator

Re: Fix logging for invalid recovery timeline

2025-02-25 Thread Benoit Lobréau
On 2/24/25 11:33 PM, Michael Paquier wrote: On Mon, Feb 24, 2025 at 05:30:35PM +, David Steele wrote: +/* translator: %s is a backup_label or pg_control file */ See for example PostmasterMain() with the "/* translator: %s is a configuration file */". Thank

Re: Fix logging for invalid recovery timeline

2025-02-24 Thread Michael Paquier
On Mon, Feb 24, 2025 at 05:30:35PM +, David Steele wrote: > +/* translator: %s is a backup_label or > pg_control file */ See for example PostmasterMain() with the "/* translator: %s is a configuration file */". > + errdetail("Latest checkpoint in %s

Re: Fix logging for invalid recovery timeline

2025-02-24 Thread David Steele
On 2/24/25 10:21, Benoit Lobréau wrote: On 2/24/25 2:05 AM, Michael Paquier wrote: I think that you have the right idea here, avoiding the duplication of the errdetail() which feels itchy when looking at the patch. Done this way in the attached patch. This looks good to me. This should ha

Re: Fix logging for invalid recovery timeline

2025-02-24 Thread Benoit Lobréau
On 2/24/25 2:05 AM, Michael Paquier wrote: I think that you have the right idea here, avoiding the duplication of the errdetail() which feels itchy when looking at the patch. Done this way in the attached patch. This should have a note for translators that this field refers to a file name.

Re: Fix logging for invalid recovery timeline

2025-02-23 Thread Michael Paquier
On Sat, Feb 22, 2025 at 04:17:44PM +, David Steele wrote: > I think for translation purposes this is probably how it needs to be but I > wonder if we could do something like: > > errdetail("Latest checkpoint in %s is at %X/%X <...>", > haveBackupLabel ? "pg_control" ? "backup_label",

Re: Fix logging for invalid recovery timeline

2025-02-22 Thread David Steele
On 2/21/25 09:09, Benoit Lobréau wrote: On 2/20/25 4:40 PM, David Steele wrote: Benoit -- this was your idea. Did you want to submit a patch yourself? Here is an attempt at that. I kept the wording I used above. Is it fine to repeat the whole ereport block twice? I think for translation pur

Re: Fix logging for invalid recovery timeline

2025-02-21 Thread Benoit Lobréau
On 2/20/25 4:40 PM, David Steele wrote: Benoit -- this was your idea. Did you want to submit a patch yourself? Here is an attempt at that. I kept the wording I used above. Is it fine to repeat the whole ereport block twice? -- Benoit Lobréau Consultant http://dalibo.com From 44459bf799fca517

Re: Fix logging for invalid recovery timeline

2025-02-20 Thread David Steele
On 2/19/25 19:45, Michael Paquier wrote: On Wed, Feb 19, 2025 at 05:35:18PM +, David Steele wrote: I like this idea but I would prefer to get the patch committed as-is first. The reason is that I'm hoping to see this batch-patched (since it is a bug) and that is less likely if the message wo

Re: Fix logging for invalid recovery timeline

2025-02-19 Thread Michael Paquier
On Wed, Feb 19, 2025 at 05:35:18PM +, David Steele wrote: > I like this idea but I would prefer to get the patch committed as-is first. > The reason is that I'm hoping to see this batch-patched (since it is a bug) > and that is less likely if the message wording is change. (Had this thread fla

Re: Fix logging for invalid recovery timeline

2025-02-19 Thread David Steele
On 2/19/25 03:51, Benoit Lobréau wrote: I think the changes make sense. Would it be helpful to add the origin of the checkpoint record we are referring to ? (i.e. control file or backup label). For example: * Latest checkpoint in the control file is at %X/%X on timeline %u, * Checkpoint loc

Re: Fix logging for invalid recovery timeline

2025-02-19 Thread Benoit Lobréau
Hi, I think the changes make sense. Would it be helpful to add the origin of the checkpoint record we are referring to ? (i.e. control file or backup label). For example: * Latest checkpoint in the control file is at %X/%X on timeline %u, * Checkpoint location in the backup_label file is at

Re: Fix logging for invalid recovery timeline

2024-12-24 Thread David Steele
On 12/20/24 23:28, Andrey M. Borodin wrote: On 20 Dec 2024, at 20:37, David Steele wrote: "Latest checkpoint is at %X/%X on timeline %u, but in the history of the requested timeline, the server forked off from that timeline at %X/%X." I think errdetai here is very hard to follow. I seem to

Re: Fix logging for invalid recovery timeline

2024-12-20 Thread Andrey M. Borodin
> On 20 Dec 2024, at 20:37, David Steele wrote: > > "Latest checkpoint is at %X/%X on timeline %u, but in the history of the > requested timeline, the server forked off from that timeline at %X/%X." I think errdetai here is very hard to follow. I seem to understand what is going on after re