Re: pg_resetwal tests, logging, and docs update

2023-11-06 Thread Peter Eisentraut
On 01.11.23 12:12, Aleksander Alekseev wrote: Hi, Hmm. I think maybe we should fix the behavior of GetDataDirectoryCreatePerm() to be more consistent between Windows and non-Windows. This is usually the first function a program uses on the proposed data directory, so it's also responsible

Re: pg_resetwal tests, logging, and docs update

2023-11-01 Thread Aleksander Alekseev
Hi, > Hmm. I think maybe we should fix the behavior of > GetDataDirectoryCreatePerm() to be more consistent between Windows and > non-Windows. This is usually the first function a program uses on the > proposed data directory, so it's also responsible for reporting if the > data directory does

Re: pg_resetwal tests, logging, and docs update

2023-10-31 Thread Peter Eisentraut
On 30.10.23 12:55, Aleksander Alekseev wrote: The patch LGTM. However, postgresql:pg_resetwal test suite doesn't pass on Windows according to cfbot. Seems to be a matter of picking a more generic regular expression: ``` at C:/cirrus/src/bin/pg_resetwal/t/001_basic.pl line 54.

Re: pg_resetwal tests, logging, and docs update

2023-10-30 Thread Aleksander Alekseev
Hi, > Here are updated versions of the remaining patches. I took out the > "FIXME" notes about the multipliers applying to the -c option and > replaced them by gentler comments. I don't intend to resolve those > issues here. The patch LGTM. However, postgresql:pg_resetwal test suite doesn't

Re: pg_resetwal tests, logging, and docs update

2023-10-29 Thread Peter Eisentraut
On 29.09.23 10:02, Peter Eisentraut wrote: On 26.09.23 17:19, Aleksander Alekseev wrote: Attached is an updated patch set where I have split the changes into smaller pieces.  The last two patches still have some open questions about what certain constants mean etc.  The other patches should be

Re: pg_resetwal tests, logging, and docs update

2023-09-29 Thread Peter Eisentraut
On 26.09.23 17:19, Aleksander Alekseev wrote: Attached is an updated patch set where I have split the changes into smaller pieces. The last two patches still have some open questions about what certain constants mean etc. The other patches should be settled. The patches 0001..0005 seem to be

Re: pg_resetwal tests, logging, and docs update

2023-09-26 Thread Aleksander Alekseev
Hi, > Hmm, I think I like "where" better. OK. > Attached is an updated patch set where I have split the changes into > smaller pieces. The last two patches still have some open questions > about what certain constants mean etc. The other patches should be settled. The patches 0001..0005 seem

Re: pg_resetwal tests, logging, and docs update

2023-09-19 Thread Peter Eisentraut
On 13.09.23 16:36, Aleksander Alekseev wrote: All in all the patch looks OK but I have a couple of nitpicks. ``` + working on a data directory in an unclean shutdown state or with a corrupt + control file. ``` ``` + After running this command on a data directory with corrupted WAL or a +

Re: pg_resetwal tests, logging, and docs update

2023-09-13 Thread Peter Eisentraut
On 13.09.23 16:36, Aleksander Alekseev wrote: ``` +// FIXME: why 2? if (set_oldest_commit_ts_xid < 2 && ``` Should we rewrite this to < FrozenTransactionId ? That's what I suspect, but we should confirm that. ``` +$mult = 32 * $blcksz * 4; # FIXME ```

Re: pg_resetwal tests, logging, and docs update

2023-09-13 Thread Aleksander Alekseev
Hi, > I noticed that pg_resetwal has poor test coverage. There are some TAP > tests, but they all run with -n, so they don't actually test the full > functionality. (There is a non-dry-run call of pg_resetwal in the > recovery test suite, but that is incidental.) > > So I added a bunch of more

pg_resetwal tests, logging, and docs update

2023-08-30 Thread Peter Eisentraut
I noticed that pg_resetwal has poor test coverage. There are some TAP tests, but they all run with -n, so they don't actually test the full functionality. (There is a non-dry-run call of pg_resetwal in the recovery test suite, but that is incidental.) So I added a bunch of more tests to