Re: pg_resetwal tests, logging, and docs update

Aleksander Alekseev <aleksander@timescale.com>

From: Aleksander Alekseev <aleksander@timescale.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Peter Eisentraut <peter@eisentraut.org>
Date: 2023-10-30T11:55:12Z
Lists: pgsql-hackers
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
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.
                'pg_resetwal: error: could not change directory to
"foo": No such file or directory
  doesn't match '(?^:error: could not read permissions of directory)'
```

Should we simply use something like:

```
qr/error: could not (read|change).* directory/
```

... instead?

-- 
Best regards,
Aleksander Alekseev



Commits

  1. doc: pg_resetwal: Add comments how the multipliers are derived

  2. pg_resetwal: Add more tests and test coverage

  3. More consistent behavior of GetDataDirectoryCreatePerm on Windows

  4. doc: Improve documentation about pg_resetwal -f option

  5. pg_resetwal: Use frontend logging API

  6. pg_resetwal: Regroup --help output

  7. pg_resetwal: Improve error with wrong/missing data directory

  8. pg_resetwal: Update an obsolete comment