Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aRSc7-0008UP-5N for pgsql-performance@arkaria.postgresql.org; Thu, 04 Feb 2016 22:42:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aRSc6-0005uu-Nb for pgsql-performance@arkaria.postgresql.org; Thu, 04 Feb 2016 22:42:58 +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) (envelope-from ) id 1aRSaT-00044u-Dy for pgsql-performance@postgresql.org; Thu, 04 Feb 2016 22:41:17 +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) (envelope-from ) id 1aRSaR-00069f-4w for pgsql-performance@postgresql.org; Thu, 04 Feb 2016 22:41:16 +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 u14MfDkn005722; Thu, 4 Feb 2016 17:41:13 -0500 From: Tom Lane To: =?UTF-8?Q?Filip_Rembia=C5=82kowski?= cc: pgsql-performance@postgresql.org Subject: Re: bad COPY performance with NOTIFY in a trigger In-reply-to: References: Comments: In-reply-to =?UTF-8?Q?Filip_Rembia=C5=82kowski?= message dated "Thu, 04 Feb 2016 22:12:39 +0100" Date: Thu, 04 Feb 2016 17:41:13 -0500 Message-ID: <5721.1454625673@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org =?UTF-8?Q?Filip_Rembia=C5=82kowski?= writes: > A table has a trigger. > The trigger sends a NOTIFY. > Test with COPY FROM shows non-linear correlation between number of inserted > rows and COPY duration. No surprise, see AsyncExistsPendingNotify. You would have a lot of other performance issues with sending hundreds of thousands of distinct notify events from one transaction anyway, so I can't get terribly excited about this. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance