Timeline ID hexadecimal format - Mailing list pgsql-hackers

From Sébastien Lardière
Subject Timeline ID hexadecimal format
Date
Msg-id 8fef346e-2541-76c3-d768-6536ae052993@lardiere.net
Whole thread Raw
Responses Re: Timeline ID hexadecimal format
List pgsql-hackers
Hi,

I've been puzzled by this message:

~~~
LOG:  fetching timeline history file for timeline 17 from primary server
FATAL:  could not receive timeline history file from the primary server: 
ERROR:  could not open file "pg_xlog/00000011.history": No such file or 
directory
~~~

It took me a while to understand that the timeline id 11 in hexadecimal 
is the same as the timeline id 17 in decimal.

It appears that the first message is formatted with %u instead of %X, 
and there some others places with the some format, while WAL filename 
and history file used hexadecimal.

There is another place where timeline id is used : pg_waldump, and in 
these tools, timeline id ( -t or --timeline ) should be given in 
decimal, while filename gives it in hexadecimal : imho, it's not 
user-friendly, and can lead to user's bad input for timeline id.

The attached patch proposes to change the format of timelineid from %u 
to %X.

Regarding .po files, I don't know how to manage them. Is there any 
routine to spread the modifications? Or should I identify and change 
each message?


best regards,

-- 
Sébastien

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: improving user.c error messages
Next
From: Mikhail Gribkov
Date:
Subject: Re: GUC for temporarily disabling event triggers