Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1vvY-0002se-TW for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Oct 2017 14:54:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e1vvY-0002M2-7a for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Oct 2017 14:54:36 +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 1e1vvX-0002J7-Hp for pgsql-bugs@postgresql.org; Tue, 10 Oct 2017 14:54:35 +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 1e1vvR-0006qT-Ch for pgsql-bugs@postgresql.org; Tue, 10 Oct 2017 14:54:34 +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 v9AEsQZd018083; Tue, 10 Oct 2017 10:54:26 -0400 From: Tom Lane To: Alvaro Herrera cc: Marko Tiikkaja , Michael Paquier , PostgreSQL mailing lists Subject: Re: BUG #14830: Missed NOTIFications, PostgreSQL 9.1.24 In-reply-to: <16671.1507645188@sss.pgh.pa.us> References: <20171010140621.u4avva4cxylwpyew@alvherre.pgsql> <16671.1507645188@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 10 Oct 2017 10:19:48 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18081.1507647266.1@sss.pgh.pa.us> Date: Tue, 10 Oct 2017 10:54:26 -0400 Message-ID: <18082.1507647266@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'm a bit hesitant to put a GetSnapshotData > call into ProcessIncomingNotify, because of the possibility of adding a > lot of contention on the ProcArray if there's very heavy notify traffic. Wait, I have an idea. Let's fetch a snapshot at the top of ProcessIncomingNotify, and then use the snapshot to decide whether xids are running, instead of calling TransactionIdIsInProgress. GetSnapshotData is probably a bit heavier than a single TransactionIdIsInProgress call, but if we have to process multiple messages then this should be a net savings in ProcArray traffic. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs