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

From Petr Jelinek
Subject Re: [COMMITTERS] pgsql: Add support for temporary replication slots
Date
Msg-id 314cae39-2e7d-f5a3-d226-cfb80cf80481@2ndquadrant.com
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Add support for temporary replication slots  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [COMMITTERS] pgsql: Add support for temporary replication slots  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
On 13/12/16 00:39, Tom Lane wrote:
> I wrote:
>> Petr Jelinek <petr.jelinek@2ndquadrant.com> writes:
>>> Attached is the fixed test using the loop from test_extensions (and yes
>>> I would have missed the pg_stat_clear_snapshot() call without the hint,
>>> thanks :) ).
>
>> Pushed, thanks.
>
> 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.

I am not quite sure what would be the best way to work around that. We
could wait for the slot to disappear instead of trying to drop it, but
then the test would hang on failure.

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


pgsql-committers by date:

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