Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fi5NL-0006z4-MD for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jul 2018 22:01:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fi5NJ-0005cl-Ds for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jul 2018 22:01:45 +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.89) (envelope-from ) id 1fi5NJ-0005ca-6e; Tue, 24 Jul 2018 22:01:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fi5NG-0007mE-Mf; Tue, 24 Jul 2018 22:01:44 +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 w6OM1Xdv014888; Tue, 24 Jul 2018 18:01:33 -0400 From: Tom Lane To: Andres Freund cc: Sergei Kornilov , pgsql-hackers@postgresql.org, Peter Eisentraut , Marc Dean , Petr Jelinek , "michael.paul.powers@gmail.com" , "pgsql-bugs@lists.postgresql.org" Subject: Re: BUG #15293: Stored Procedure Triggered by Logical Replication is Unable to use Notification Events In-reply-to: <20180724215604.hwl4xk2v4ulkgvwk@alap3.anarazel.de> References: <153243441449.1404.2274116228506175596@wrigleys.postgresql.org> <45136061532438385@iva3-a2a8aac410a1.qloud-c.yandex.net> <20180724155829.zq22vov6d7erhxsx@alap3.anarazel.de> <648481532456538@myt5-0fa3e541b8b9.qloud-c.yandex.net> <20180724192740.6yn2xregaz6yhpc2@alap3.anarazel.de> <13844.1532468610@sss.pgh.pa.us> <20180724215604.hwl4xk2v4ulkgvwk@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 24 Jul 2018 14:56:04 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14886.1532469693.1@sss.pgh.pa.us> Date: Tue, 24 Jul 2018 18:01:33 -0400 Message-ID: <14887.1532469693@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > One other thing, somewhat independent, I wonder is if it's actually > problematic that we don't do ProcessCompletedNotifies() in a bunch of > processes, because that means we'll not necessarily call > asyncQueueAdvanceTail(). Perhaps that means we actually *do* need to do > it around CommitTransactionCommand()? As far as that goes, we should probably ensure that a process that hasn't executed any LISTENs is ignored for purposes of whether to advance the queue tail. I think it might be like that already. regards, tom lane