Обсуждение: Small fixes for incorrect error messages

Поиск
Список
Период
Сортировка

Small fixes for incorrect error messages

От
"zengman"
Дата:
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
Дата:
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

Вложения