pgsql: pg_resetwal: Improve error with wrong/missing data directory

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_resetwal: Improve error with wrong/missing data directory
Date: 2023-09-28 09:46:54
Message-ID: E1qlnbi-006RB6-UY@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_resetwal: Improve error with wrong/missing data directory

Run chdir() before permission check to get a less confusing error
message if the specified data directory does not exist.

Reviewed-by: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/0f3ab4a1-ae80-56e8-3426-6b4a02507687(at)eisentraut(dot)org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1d863c250461410e60c9ed5d3180f32336f4c3e2

Modified Files
--------------
src/bin/pg_resetwal/pg_resetwal.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2023-09-28 09:54:31 pgsql: pg_resetwal: Regroup --help output
Previous Message Peter Eisentraut 2023-09-28 09:35:31 pgsql: pg_resetwal: Update an obsolete comment