Re: Fix logging for invalid recovery timeline - Mailing list pgsql-hackers

From David Steele
Subject Re: Fix logging for invalid recovery timeline
Date
Msg-id 26fd4e28-8b75-4e61-a3fd-aed3b7442606@pgbackrest.org
Whole thread Raw
In response to Re: Fix logging for invalid recovery timeline  (Benoit Lobréau <benoit.lobreau@dalibo.com>)
List pgsql-hackers
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 have a note for translators that this field refers to a file
>> name. 
> 
> Is there a specific way todo this?

If you search the source for translator: you'll find lots of examples. 
Here's one that was pretty relevant:

/* translator: %s is a configuration file */

We could probably phrase that as:

/* translator: %s is a backup_label or pg_control file */

That note goes right above the hint, so something like:

+                                /* translator: %s is a backup_label or 
pg_control file */
+                 errdetail("Latest checkpoint in %s 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.",
+                           haveBackupLabel ? "backup_label" : "pg_control",

Regards,
-David




pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Make query cancellation keys longer
Next
From: Jacob Champion
Date:
Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER