Re: [ADMIN] Why does the WAL writer sit on completed segments (on Windows)?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [ADMIN] Why does the WAL writer sit on completed segments (on Windows)?
Дата
Msg-id 17213.1492442911@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [ADMIN] Why does the WAL writer sit on completed segments (on Windows)?  (Christian Ullrich <chris@chrullrich.net>)
Ответы Re: [ADMIN] Why does the WAL writer sit on completed segments (onWindows)?  (Christian Ullrich <chris@chrullrich.net>)
Re: [ADMIN] Why does the WAL writer sit on completed segments (on Windows)?  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-admin
Christian Ullrich <chris@chrullrich.net> writes:
> The reason, as Process Monitor shows, is that the WAL writer process
> keeps the file open for about one second after the
> archive_status\*.ready file has been created. The archiver runs the
> archive_command "too early", resulting in the sharing [1] violation seen
> above.

I'm not sure why that happens, but even if we changed the logic inside
walwriter to avoid it, you'd still need to adapt your archiving script
to deal with the case.  The reason is that the walwriter isn't necessarily
the only process writing WAL --- regular backends do it too, depending on
timing.  In such a case a backend would be holding an open-file reference
until the next time it tries to write WAL, which might be awhile.  It's
not really practical to change that behavior; we certainly wouldn't want
to open and close WAL files for every write.

            regards, tom lane


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

Предыдущее
От: Christian Ullrich
Дата:
Сообщение: [ADMIN] Why does the WAL writer sit on completed segments (on Windows)?
Следующее
От: Christian Ullrich
Дата:
Сообщение: Re: [ADMIN] Why does the WAL writer sit on completed segments (onWindows)?