Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGaas-00086A-5F for pgsql-committers@arkaria.postgresql.org; Tue, 13 Dec 2016 00:05:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cGaar-0003yN-I1 for pgsql-committers@arkaria.postgresql.org; Tue, 13 Dec 2016 00:05:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cGaar-0003y7-4k for pgsql-committers@postgresql.org; Tue, 13 Dec 2016 00:05:17 +0000 Received: from mail-wj0-x234.google.com ([2a00:1450:400c:c01::234]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cGaan-0003ph-O1 for pgsql-committers@postgresql.org; Tue, 13 Dec 2016 00:05:16 +0000 Received: by mail-wj0-x234.google.com with SMTP id xy5so86630782wjc.0 for ; Mon, 12 Dec 2016 16:05:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=lttKzF1yAJdMdFx2HJA0aVx+SygqAQ/pOcIRI7gQe00=; b=CgVfDyINBtKyaledq+D3nPE4miW1311nmADZu70dRJhkUW4YMWM2XuZ5YjgPQVTi8i rGnenkMXCRGTX8y1MetHCCugX86IToH+8k7OCHjKldUSwVYTvHXANuTKi3xz1kIzuD23 xVHBtJAaK/C73AIa6/ovhgVfSrpap3EDD06HZmpUL/641Jecf1Y+dVUIIIiOfYTKjyfp mz8xCrUKJXS03hqPwT7UkBOfOIkketMTrAMghj69ja7d/d/H4FlxXCojKtku17/Klcqr 8ZORkcqgHA/I7D38cy4/eAqNoM1TCb4sidu6C2RiDE9V4BMO525o6te3lEaBmN2Y3HrY W2dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=lttKzF1yAJdMdFx2HJA0aVx+SygqAQ/pOcIRI7gQe00=; b=KIOxVTkodjbzVlIUVkk9OU4cwCAi0IggCGgsDn+HoIKBlEZdPTb111GXQbvmE8poD6 I4y86ts2adYnt3tqixsYH94iwIwu55T/foQU+ZReZGUi0OCbfyfwvK8jpnTyJ+P/Pvp3 jUAtoxJ3RGVy3gzxk5b0CuoQTXnF3pznHo9G8PD0fdQGeipuHjrap69KMCutjST7ntK7 1lLtEBPY5sKdRhpP3UDjkfcSe+9Qh7YIRgaLwdepjIoFaIKfaMATOvraTrCaeP2bHWvD Org8jhD6HZoU5nMUEW1U4Bus/26EKHYNlhYQPP5Px7ux/zSL99y6PrKXnc7kc7NItn0F 6xWg== X-Gm-Message-State: AKaTC01U1+LA3+Zea+d6oUxBuKDB55I+NVv5x95LkkPe6AiQJZywKJKDKJ4Hqo9dY8mP42IDMa9/ickPT3EhRhhbnCZbmhPbyUaOF74wxpWNtd48qQGVOC6YfLoa1P4UHWRapZMi01XcLM4TrY3KSW/wxnwEvipWbIsS4VsKQCzEL6Tuu1wodz6pOVbIkthJymn/5o/HePSZ1qaG X-Received: by 10.194.59.98 with SMTP id y2mr80691599wjq.166.1481587510267; Mon, 12 Dec 2016 16:05:10 -0800 (PST) Received: from [192.168.0.105] (150.123.broadband11.iol.cz. [90.178.123.150]) by smtp.gmail.com with ESMTPSA id 197sm37818779wmy.16.2016.12.12.16.05.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Dec 2016 16:05:09 -0800 (PST) Subject: Re: pgsql: Add support for temporary replication slots To: Tom Lane References: <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> Cc: Peter Eisentraut , pgsql-committers@postgresql.org From: Petr Jelinek Message-ID: <314cae39-2e7d-f5a3-d226-cfb80cf80481@2ndquadrant.com> Date: Tue, 13 Dec 2016 01:05:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <15713.1481585953@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 13/12/16 00:39, Tom Lane wrote: > I wrote: >> Petr Jelinek 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 -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers