Timeline ID hexadecimal format
Sébastien Lardière <sebastien@lardiere.net>
From: Sébastien Lardière <sebastien@lardiere.net>
To: pgsql-hackers@postgresql.org
Date: 2023-01-27T13:52:19Z
Lists: pgsql-hackers
Attachments
- v1_0001_timelineid_hexadecimal_format.patch (text/x-patch) patch v1
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
Commits
-
pg_waldump: Allow hexadecimal values for -t/--timeline option
- 4c8044c04455 16.0 landed
-
doc: Additional information about timeline ID hexadecimal format
- 0b51d423e974 16.0 landed