Thread
Commits
-
Further error message fix
- 3e7bb39df7de 14.21 landed
- 9dcd0b3de14c 15.16 landed
- a7bdbbadac3b 16.12 landed
- 5449fd261ea8 17.8 landed
- cff2ef9845d6 18.2 landed
- 1653ce5236c4 19 (unreleased) landed
-
Fix some error message inconsistencies
- d32e17160971 14.21 landed
- 4ec943f7dcb0 15.16 landed
- 977a17a3eb33 16.12 landed
- 67ad4387b226 17.8 landed
- acfa422c3c1f 18.2 landed
- 74a116a79b47 19 (unreleased) landed
-
Small fixes for incorrect error messages
zengman <zengman@halodbtech.com> — 2026-02-05T06:51:05Z
Hi all, I found a few easily overlooked error messages worth fixing, as follows: 01 ``` if (!is_absolute_path(tsmap->new_dir)) - pg_fatal("old directory is not an absolute path in tablespace mapping: %s", + pg_fatal("new directory is not an absolute path in tablespace mapping: %s", tsmap->new_dir); ``` 02 ``` if (rb < 0) - pg_fatal("could not read from file \"%s\": %m", dst); + pg_fatal("could not read from file \"%s\": %m", src); ``` 03 ``` if (fstat(fd, &statbuf) < 0) - pg_fatal("could not open file \"%s\" for reading: %m", + pg_fatal("could not stat file \"%s\" for reading: %m", fullpath); ``` -- regards, Man Zeng -
Re: Small fixes for incorrect error messages
Michael Paquier <michael@paquier.xyz> — 2026-02-05T10:28:00Z
On Thu, Feb 05, 2026 at 02:51:05PM +0800, zengman wrote: > I found a few easily overlooked error messages worth fixing, as follows: Good catches. Obviously a copy-pasto for the first and third ones, and a thinko for the second one. -- Michael
-
Re: Small fixes for incorrect error messages
Michael Paquier <michael@paquier.xyz> — 2026-02-06T06:44:27Z
On Thu, Feb 05, 2026 at 07:28:00PM +0900, Michael Paquier wrote: > Good catches. Obviously a copy-pasto for the first and third ones, > and a thinko for the second one. Fixed these ones. -- Michael
-
Re: Small fixes for incorrect error messages
zengman <zengman@halodbtech.com> — 2026-02-06T07:54:22Z
> Fixed these ones. Thanks a lot for your help with this! I previously reported another similar issue – could you please take a moment to look at it? Maybe we could fix it along the way. https://www.postgresql.org/message-id/flat/tencent_6D253E6F517F8F85796F0D9D@qq.com -- regards, Man Zeng
-
Re: Small fixes for incorrect error messages
Peter Eisentraut <peter@eisentraut.org> — 2026-02-07T08:57:20Z
On 05.02.26 07:51, zengman wrote: > ``` > if (fstat(fd, &statbuf) < 0) > - pg_fatal("could not open file \"%s\" for reading: %m", > + pg_fatal("could not stat file \"%s\" for reading: %m", > fullpath); > ``` It doesn't make sense to "stat a file for reading". The changed message should probably just be > + pg_fatal("could not stat file \"%s\": %m", > fullpath); -
Re: Small fixes for incorrect error messages
zengman <zengman@halodbtech.com> — 2026-02-07T09:24:44Z
> It doesn't make sense to "stat a file for reading". The changed message > should probably just be > + pg_fatal("could not stat file \"%s\": %m", > fullpath); You're right. I was careless earlier, my apologies. -- regards, Man Zeng -
Re: Small fixes for incorrect error messages
Peter Eisentraut <peter@eisentraut.org> — 2026-02-07T22:03:36Z
On 07.02.26 10:24, zengman wrote: >> It doesn't make sense to "stat a file for reading". The changed message >> should probably just be >> + pg_fatal("could not stat file \"%s\": %m", >> fullpath); > > You're right. I was careless earlier, my apologies. Ok, I have fixed this. -
Re: Small fixes for incorrect error messages
Michael Paquier <michael@paquier.xyz> — 2026-02-08T23:11:03Z
On Sat, Feb 07, 2026 at 11:03:36PM +0100, Peter Eisentraut wrote: > On 07.02.26 10:24, zengman wrote: >> You're right. I was careless earlier, my apologies. > > Ok, I have fixed this. Thanks for the fix. (I was away from my laptop.) -- Michael