Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGbcY-00020F-Uw for pgsql-committers@arkaria.postgresql.org; Tue, 13 Dec 2016 01:11:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cGbcY-0000bx-Eu for pgsql-committers@arkaria.postgresql.org; Tue, 13 Dec 2016 01:11:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cGbcY-0000bc-3r for pgsql-committers@postgresql.org; Tue, 13 Dec 2016 01:11:06 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cGbcV-0005Dc-O0 for pgsql-committers@postgresql.org; Tue, 13 Dec 2016 01:11:04 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 31F9C209C8; Mon, 12 Dec 2016 20:11:03 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Mon, 12 Dec 2016 20:11:03 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=ibcSe1at2wHFpa ZHu014CgyBQ4k=; b=HvYevyfSZW7rSp2Dy8F3caVLklkZVXPNjuGELw+32yXklV 7n0d2FpCWfNt5x5Z25RX1og8cKdKmtTc/VT3uLPtOdUMVVh2xrWrvG0GaT0v/M3D hs23Ws2xfEaGvTp6rW+3JqMeJhvpdJ2taXVhM8b+REskdjMk0qKrTLCoopqVQ= X-ME-Sender: X-Sasl-enc: kupdGVBEQJtYaO8EvkUm3+Ce8Kjuq0QD9XeSpVGDxwG5 1481591462 Received: from intern.anarazel.de (unknown [208.71.159.84]) by mail.messagingengine.com (Postfix) with ESMTPA id E53A224CD3; Mon, 12 Dec 2016 20:11:02 -0500 (EST) Date: Mon, 12 Dec 2016 17:11:01 -0800 From: Andres Freund To: Tom Lane Cc: Petr Jelinek , Peter Eisentraut , pgsql-committers@postgresql.org Subject: Re: pgsql: Add support for temporary replication slots Message-ID: <20161213011101.xctlra2ujq6zpnzm@alap3.anarazel.de> References: <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> <20161213004903.iito2pefdrrjgny5@alap3.anarazel.de> <6886c56a-f6c8-3c44-53a1-dae6c24afb76@2ndquadrant.com> <20161213010059.dn64rrb3u7zxnnwk@alap3.anarazel.de> <19997.1481591281@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19997.1481591281@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 2016-12-12 20:08:01 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2016-12-13 01:57:01 +0100, Petr Jelinek wrote: > >> I mentioned that as possible solution upthread, I am only worried that > >> the failure scenario is basically infinite loop. > > > I don't see the problem with that. If you're really concerned you can > > set a statement timeout. > > I don't think "change the test" is the right response here. > I think the problem is that we're disconnecting from the slot at the > wrong step of backend shutdown, and that we need to fix that before > it bites us on some more painful parts of our anatomies. You can't > just throw darts at the code when deciding where to do things, and > proc.c is NOT the place that should be concerned with replication > slots. And why is that / where would be more appropriate? It's not ShutdownPostgres() (usable from bgworkers). And it has to be after LWLockReleaseAll(), because otherwise we'll potentially just deadlock against ourselves. Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers