Re: BUG #16154: pg_ctl restart with a logfile fails sometimes (on Windows)

Поиск
Список
Период
Сортировка
От Alexander Law
Тема Re: BUG #16154: pg_ctl restart with a logfile fails sometimes (on Windows)
Дата
Msg-id CAJ0YPFFa6nLbHBYbiu5HgKZ5XYnOLsW4RaJgdjp8LA6x4p4kxA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #16154: pg_ctl restart with a logfile fails sometimes (on Windows)  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: BUG #16154: pg_ctl restart with a logfile fails sometimes (on Windows)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
07.12.2019 15:36 Amit Kapila <amit.kapila16@gmail.com>:
On Fri, Dec 6, 2019 at 1:30 PM Alexander Lakhin <exclusion@gmail.com> wrote:
>

> If this file is still opened by the previous server shell (it can happen when the previous server instance has unlinked it's pid file, but it's CMD shell is still running), the next CMD start fails with the aforementioned error message.
>

What is the reason for the previous shell still accessing logfile?
Is the reason that we don't close it before unlinking the pid file?
We can't close the logfile, as it is opened by CMD, not by the postgres process. (Postmaster is started by the command "CMD.EXE /C postgres ... >logfile".) So it is closed by the CMD shell after the postgres process exits and the postgres can't control this (as a child process).

Best regards,
Alexander

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: BUG #16154: pg_ctl restart with a logfile fails sometimes (on Windows)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16154: pg_ctl restart with a logfile fails sometimes (on Windows)