Small fixes for incorrect error messages
zengman <zengman@halodbtech.com>
From: zengman <zengman@halodbtech.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Michael Paquier <michael@paquier.xyz>
Date: 2026-02-05T06:51:05Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-error-message-for-non-absolute-new-directory-in-.patch (application/octet-stream) patch 0001
- 0002-Fix-error-message-in-copy_file_blocks-to-reference-s.patch (application/octet-stream) patch 0002
- 0003-Fix-error-message-in-slurpFile-to-clarify-file-statu.patch (application/octet-stream) patch 0003
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
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