Re: [COMMITTERS] pgsql: Add support for temporary replication slots

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: [COMMITTERS] pgsql: Add support for temporary replication slots
Дата
Msg-id 48b2c017-695d-b5ac-2ff4-89b939b3e8f9@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Add support for temporary replication slots  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [COMMITTERS] pgsql: Add support for temporary replication slots  (Andres Freund <andres@anarazel.de>)
Список pgsql-committers
On 13/12/16 01:40, Tom Lane wrote:
> Petr Jelinek <petr.jelinek@2ndquadrant.com> writes:
>> On 13/12/16 00:39, Tom Lane wrote:
>>> Hm, buildfarm says this didn't fix it.  Where exactly does the dropping
>>> of the slot happen ... is it not complete by the time the backend exits?
>
>> Yes, I've seen. The cleanup of slots is done in ProcKill(), I wonder,
>> since it's on_shmem_exit hook, and the pgstat_beshutdown_hook is as
>> well, maybe the pgstat_beshutdown_hook is called before ProcKill and the
>> query is lucky to hit right in between.
>
> Hm.  That seems like a pretty bogus place to do it.  An awful lot of the
> backend infrastructure is already gone by then, if I recall the ordering
> correctly.  Maybe ShutdownPostgres would be a saner place; but it really
> depends on what you think the module layering is for this facility.
> I would definitely not think it is proc.c's responsibility, though.
>

Well, the problem is that that's the place where the currently active
slot is released (if there was an active one). So we'd need to move that
part somewhere else as well. I am not sure what's the reasoning for
releasing it at that specific spot so CCing Andres.

--
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add support for temporary replication slots
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add support for temporary replication slots