pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Add support for temporary replication slots
Date: Mon, 12 Dec 2016 16:49:03 -0800
Message-ID: <20161213004903.iito2pefdrrjgny5@alap3.anarazel.de> (raw)
In-Reply-To: <48b2c017-695d-b5ac-2ff4-89b939b3e8f9@2ndquadrant.com>
References: <E1cGRP8-0003EH-So@gemulon.postgresql.org>
	<27274.1481557380@sss.pgh.pa.us>
	<27833.1481558144@sss.pgh.pa.us>
	<62935e6f-4f1b-c433-e0fa-7f936a38b3e5@2ndquadrant.com>
	<22907.1481571177@sss.pgh.pa.us>
	<15713.1481585953@sss.pgh.pa.us>
	<314cae39-2e7d-f5a3-d226-cfb80cf80481@2ndquadrant.com>
	<18684.1481589637@sss.pgh.pa.us>
	<48b2c017-695d-b5ac-2ff4-89b939b3e8f9@2ndquadrant.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

On 2016-12-13 01:42:48 +0100, Petr Jelinek wrote:
> 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.

Why don't we just instead make the loop over pg_replication_slots?

Andres


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



view thread (22+ messages)  latest in thread

Message-ID: <20161213004903.iito2pefdrrjgny5@alap3.anarazel.de>
Permalink:  ../20161213004903.iito2pefdrrjgny5@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20161213004903.iito2pefdrrjgny5@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, petr.jelinek@2ndquadrant.com, tgl@sss.pgh.pa.us, peter_e@gmx.net
  Subject: Re: pgsql: Add support for temporary replication slots
  In-Reply-To: <20161213004903.iito2pefdrrjgny5@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox