Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows
Дата
Msg-id ZPl9pAlFaGxhCQqw@paquier.xyz
обсуждение исходный текст
Ответ на pg_ctl start may return 0 even if the postmaster has been already started on Windows  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Ответы RE: pg_ctl start may return 0 even if the postmaster has been already started on Windows  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Список pgsql-hackers
On Thu, Sep 07, 2023 at 07:07:36AM +0000, Hayato Kuroda (Fujitsu) wrote:
> # Problem
>
> The "pg_ctl start" command returns 0 (succeeded) even if the cluster has
> already been started. This occurs on Windows environment, and when the command
> is executed just after postmaster starts.

Not failing on `pg_ctl start` if the command is run on a data folder
that has already been started previously by a different command with a
postmaster still alive feels like cheating, because pg_ctl is lying
about its result.  If pg_ctl wants to start a cluster but is not able
to do it, either because the postmaster failed at startup or because
the cluster has already started, it should report a failure.  Now, I
also recall that the processes spawned by pg_ctl on Windows make the
status handling rather tricky to reason about..
--
Michael

Вложения

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

Предыдущее
От: Ashutosh Sharma
Дата:
Сообщение: Re: Can a role have indirect ADMIN OPTION on another role?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: persist logical slots to disk during shutdown checkpoint