Re: Remove trailing newlines from pg_upgrade's messages

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: Remove trailing newlines from pg_upgrade's messages
Дата
Msg-id 20220615.131403.1791191615590453058.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: Remove trailing newlines from pg_upgrade's messages  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: Remove trailing newlines from pg_upgrade's messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
At Wed, 15 Jun 2022 13:05:52 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
> By the way, I noticed that pg_upgrade complains wrong way when the
> specified binary path doesn't contain "postgres" file.
> 
> $ pg_upgrade -b /tmp -B /tmp -d /tmp -D /tmp
> 
> check for "/tmp/postgres" failed: not a regular file
> Failure, exiting
> 
> I think it should be a quite common mistake to specify the parent
> directory of the binary directory..

FWIW, the following change makes sense to me according to the spec of
validate_exec()...

diff --git a/src/bin/pg_upgrade/exec.c b/src/bin/pg_upgrade/exec.c
index fadeea12ca..3cff186213 100644
--- a/src/bin/pg_upgrade/exec.c
+++ b/src/bin/pg_upgrade/exec.c
@@ -430,10 +430,10 @@ check_exec(const char *dir, const char *program, bool check_version)
     ret = validate_exec(path);
 
     if (ret == -1)
-        pg_fatal("check for \"%s\" failed: not a regular file\n",
+        pg_fatal("check for \"%s\" failed: does not exist or inexecutable\n",
                  path);
     else if (ret == -2)
-        pg_fatal("check for \"%s\" failed: cannot execute (permission denied)\n",
+        pg_fatal("check for \"%s\" failed: cannot read (permission denied)\n",
                  path);
 
     snprintf(cmd, sizeof(cmd), "\"%s\" -V", path);

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Richard Guo
Дата:
Сообщение: Re: Remove useless param for create_groupingsets_path
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Collation version tracking for macOS