Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0bwP-0003It-9K for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Oct 2017 23:22:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e0bwO-0006rZ-Ni for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Oct 2017 23:22:00 +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 1e0bvg-0005cg-PR for pgsql-bugs@postgresql.org; Fri, 06 Oct 2017 23:21:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e0bve-0001rR-34 for pgsql-bugs@postgresql.org; Fri, 06 Oct 2017 23:21:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v96NLA5t032119; Fri, 6 Oct 2017 19:21:10 -0400 From: Tom Lane To: Ben Chobot cc: Andres Freund , Michael Paquier , PostgreSQL mailing lists Subject: Re: pg_logical_slot_peek_changes crashes postgres when called from inside pl/pgsql In-reply-to: <409.1507325342@sss.pgh.pa.us> References: <73FBA179-C68C-4540-9473-71E865408B15@silentmedia.com> <8637.1507217920@sss.pgh.pa.us> <20171005211058.z5obk2c2e7zvauk6@alap3.anarazel.de> <32374.1507239819@sss.pgh.pa.us> <20171005230105.qv2yrtadbkbc5y5r@alap3.anarazel.de> <4563.1507246950@sss.pgh.pa.us> <20171006052105.jfxllpi6lcu7q2a7@alap3.anarazel.de> <409.1507325342@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 06 Oct 2017 17:29:02 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32117.1507332070.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 06 Oct 2017 19:21:10 -0400 Message-ID: <32118.1507332070@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org I wrote: > I thought of a better way, as attached. Pushed. Ben, could you confirm that the committed patch fixes your original use-case? The 9.5 version of the patch is at https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dcommitdiff;h=3D13= d2ed921035f2d88adf87d796373e920bdd56ee regards, tom lane --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs