Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iP5uP-0003Aq-AO for pgsql-performance@arkaria.postgresql.org; Mon, 28 Oct 2019 14:22:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iP5uM-0006Vq-Gm for pgsql-performance@arkaria.postgresql.org; Mon, 28 Oct 2019 14:22:10 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iP5uM-0006VH-7N for pgsql-performance@lists.postgresql.org; Mon, 28 Oct 2019 14:22:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iP5uJ-0004Hb-Hu for pgsql-performance@lists.postgresql.org; Mon, 28 Oct 2019 14:22:09 +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 x9SEM4k0015980; Mon, 28 Oct 2019 10:22:05 -0400 From: Tom Lane To: =?UTF-8?Q?Gr=c3=a9goire_de_Turckheim?= cc: pgsql-performance@lists.postgresql.org Subject: Re: Notifications within triggers seem to compromise performance In-reply-to: <2b617759-5c59-de3c-1de0-bed20d9c0db1@scaleway.com> References: <2b617759-5c59-de3c-1de0-bed20d9c0db1@scaleway.com> Comments: In-reply-to =?UTF-8?Q?Gr=c3=a9goire_de_Turckheim?= message dated "Mon, 28 Oct 2019 14:42:03 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15978.1572272524.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 28 Oct 2019 10:22:04 -0400 Message-ID: <15979.1572272524@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =3D?UTF-8?Q?Gr=3Dc3=3Da9goire_de_Turckheim?=3D = writes: > I guess we stumbled upon a performance issue with notifications sent wit= hin triggers (using PostgreSQL version 11.5) > and I'd like your opinion about this. We made some performance improvements for NOTIFY just a couple months ago, cf commits b10f40bf0, bb5ae8f6c, bca6e6435, 51004c717. It would be interesting to know how much those changes helped your use-case. I'm quite disinclined to reduce the correctness guarantees around NOTIFY for performance's sake. That's the sort of thing that sounds like a good idea until you find out that it subtly breaks your application, and then you've got nothing. regards, tom lane