Re: pg_ctl on windows can't open postmaster.pid: Permission denied

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: pg_ctl on windows can't open postmaster.pid: Permission denied
Дата
Msg-id CAEepm=1SX0z42zxkg+kaoNNWnsNKbzHVw4nooc0DGZ=5ObPV-A@mail.gmail.com
обсуждение исходный текст
Ответ на pg_ctl on windows can't open postmaster.pid: Permission denied  (Andres Freund <andres@anarazel.de>)
Ответы Re: pg_ctl on windows can't open postmaster.pid: Permission denied  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
On Wed, Dec 13, 2017 at 4:24 PM, Andres Freund <andres@anarazel.de> wrote:
> Hi,
>
> Buildfarm animal thrips just failed with a curious error:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=thrips&dt=2017-12-13%2002%3A27%3A27
>
> ============== shutting down postmaster               ==============
> pg_ctl: could not open PID file
"C:/buildfarm/buildenv/HEAD/pgsql.build/src/test/regress/./tmp_check/data/postmaster.pid":Permission denied
 
>
> otherwise there were no failures.
>
> I wonder if we're not opening the file with the right options to allow
> us to open it while it's opened for writes in another backend? In the
> backend we do so via FILE_SHARE_READ pgwin32_open which backs open and
> fopen in backend code.

Yeah, pg_ctl.c must be using fopen directly (from Windows' libc/crt).
A sharing violation would indeed appear as errno == EACCES by my
reading of the docs so that matches your theory.  I think this code
should use pgwin32_fopen on Windows.

-- 
Thomas Munro
http://www.enterprisedb.com


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: plpgsql test layout
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Using ProcSignal to get memory context stats from a running backend