Re: [COMMITTERS] pgsql: Add support for temporary replication slots - Mailing list pgsql-committers

From Tom Lane
Subject Re: [COMMITTERS] pgsql: Add support for temporary replication slots
Date
Msg-id 18684.1481589637@sss.pgh.pa.us
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Add support for temporary replication slots  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Responses Re: [COMMITTERS] pgsql: Add support for temporary replication slots  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Re: [COMMITTERS] pgsql: Add support for temporary replication slots  (Andres Freund <andres@anarazel.de>)
List pgsql-committers
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.

            regards, tom lane


pgsql-committers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: [COMMITTERS] pgsql: Add support for temporary replication slots
Next
From: Petr Jelinek
Date:
Subject: Re: [COMMITTERS] pgsql: Add support for temporary replication slots