Re: Timeline ID hexadecimal format

2023-03-21 Thread Sébastien Lardière
On 21/03/2023 08:15, Peter Eisentraut wrote: On 20.03.23 10:40, Sébastien Lardière wrote: About option_parse_int(), actually, strtoint() is used, do we need a option_parse_ul() fonction ? For the option parsing, I propose the attached patch.  This follows the structure of option_parse_int(),

Re: Timeline ID hexadecimal format

2023-03-21 Thread Peter Eisentraut
On 20.03.23 10:40, Sébastien Lardière wrote: About option_parse_int(), actually, strtoint() is used, do we need a option_parse_ul() fonction ? For the option parsing, I propose the attached patch.  This follows the structure of option_parse_int(), so in the future it could be extracted and re

Re: Timeline ID hexadecimal format

2023-03-20 Thread Sébastien Lardière
On 20/03/2023 09:17, Peter Eisentraut wrote: I have committed the two documentation changes, with some minor adjustments. Thank you, On 07.03.23 18:14, Sébastien Lardière wrote: Maybe this could be fixed instead? Indeed, and strtoul is probably a better option than sscanf, don't you th

Re: Timeline ID hexadecimal format

2023-03-20 Thread Peter Eisentraut
I have committed the two documentation changes, with some minor adjustments. On 07.03.23 18:14, Sébastien Lardière wrote: Maybe this could be fixed instead? Indeed, and strtoul is probably a better option than sscanf, don't you think ? Yeah, the use of sscanf() is kind of weird here.  We ha

Re: Timeline ID hexadecimal format

2023-03-07 Thread Sébastien Lardière
On 06/03/2023 18:04, Peter Eisentraut wrote: On 03.03.23 16:52, Sébastien Lardière wrote: On 02/03/2023 09:12, Peter Eisentraut wrote: I think here it would be more helpful to show actual examples. Like, here is a possible file name, this is what the different parts mean. So you mean explai

Re: Timeline ID hexadecimal format

2023-03-06 Thread Peter Eisentraut
On 03.03.23 16:52, Sébastien Lardière wrote: On 02/03/2023 09:12, Peter Eisentraut wrote: On 24.02.23 17:27, Sébastien Lardière wrote: diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index be05a33205..7e26b51031 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sg

Re: Timeline ID hexadecimal format

2023-03-03 Thread Robert Haas
On Tue, Jan 31, 2023 at 2:16 PM Greg Stark wrote: > I don't see any advantage in converting every place where we refer to > timelines into hex and then having to refer to things like timeline > 1A. It doesn't seem any more intuitive to someone understanding what's > going on than referring to time

Re: Timeline ID hexadecimal format

2023-03-03 Thread Sébastien Lardière
On 02/03/2023 09:12, Peter Eisentraut wrote: On 24.02.23 17:27, Sébastien Lardière wrote: diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index be05a33205..7e26b51031 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -1332,7 +1332,8 @@ restore_command = 'cp

Re: Timeline ID hexadecimal format

2023-03-02 Thread Peter Eisentraut
On 24.02.23 17:27, Sébastien Lardière wrote: diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index be05a33205..7e26b51031 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -1332,7 +1332,8 @@ restore_command = 'cp/mnt/server/archivedir/%f %p' you like,

Re: Timeline ID hexadecimal format

2023-02-24 Thread Sébastien Lardière
On 31/01/2023 20:16, Greg Stark wrote: A hint or something just in that case might be enough? It seems to be a -1 ; let's try to improve the documentation, with the attached patch best regards, -- Sébastien diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index be05a33205..7e

Re: Timeline ID hexadecimal format

2023-02-01 Thread Sébastien Lardière
On 31/01/2023 20:16, Greg Stark wrote: The fact that the *filename* has it encoded in hex is an implementation detail and really gets exposed here because it's giving you the underlying system error that caused the problem. It's an implementation detail, but an exposed detail, so, people refer

Re: Timeline ID hexadecimal format

2023-01-31 Thread Greg Stark
I actually find it kind of annoying that we use hex strings for a lot of things where they don't add any value. Namely Transaction ID and LSNs. As a result it's always a bit of a pain to ingest these in other tools or do arithmetic on them. Neither is referring to memory or anything where powers of

Re: Timeline ID hexadecimal format

2023-01-31 Thread Sébastien Lardière
On 31/01/2023 10:53, Peter Eisentraut wrote: On 30.01.23 17:05, Sébastien Lardière wrote: Here's the patch with the suggested format ; plus, I add some note in the documentation about recovery_target_timeline, because I don't get how strtoul(), with the special 0 base parameter can work witho

Re: Timeline ID hexadecimal format

2023-01-31 Thread Sébastien Lardière
On 31/01/2023 12:26, Ashutosh Bapat wrote: On Mon, Jan 30, 2023 at 9:35 PM Sébastien Lardière wrote: On 27/01/2023 15:55, Peter Eisentraut wrote: On 27.01.23 14:52, Sébastien Lardière wrote: The attached patch proposes to change the format of timelineid from %u to %X. I think your complaint

Re: Timeline ID hexadecimal format

2023-01-31 Thread Ashutosh Bapat
On Mon, Jan 30, 2023 at 9:35 PM Sébastien Lardière wrote: > > On 27/01/2023 15:55, Peter Eisentraut wrote: > > On 27.01.23 14:52, Sébastien Lardière wrote: > >> The attached patch proposes to change the format of timelineid from > >> %u to %X. > > > > I think your complaint has merit. But note th

Re: Timeline ID hexadecimal format

2023-01-31 Thread Peter Eisentraut
On 30.01.23 17:05, Sébastien Lardière wrote: Here's the patch with the suggested format ; plus, I add some note in the documentation about recovery_target_timeline, because I don't get how strtoul(), with the special 0 base parameter can work without 0x prefix ; I suppose that nobody use it.

Re: Timeline ID hexadecimal format

2023-01-30 Thread Sébastien Lardière
On 27/01/2023 15:55, Peter Eisentraut wrote: On 27.01.23 14:52, Sébastien Lardière wrote: The attached patch proposes to change the format of timelineid from %u to %X. I think your complaint has merit.  But note that if we did a change like this, then log files or reports from different versi

Re: Timeline ID hexadecimal format

2023-01-27 Thread Sébastien Lardière
On 27/01/2023 15:55, Peter Eisentraut wrote: On 27.01.23 14:52, Sébastien Lardière wrote: The attached patch proposes to change the format of timelineid from %u to %X. I think your complaint has merit.  But note that if we did a change like this, then log files or reports from different versi

Re: Timeline ID hexadecimal format

2023-01-27 Thread Peter Eisentraut
On 27.01.23 14:52, Sébastien Lardière wrote: The attached patch proposes to change the format of timelineid from %u to %X. I think your complaint has merit. But note that if we did a change like this, then log files or reports from different versions would have different meaning without a vi

Timeline ID hexadecimal format

2023-01-27 Thread Sébastien Lardière
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/0011.history": No such file or directory ~~~ It took me a whil