From: Harald Fuchs <hari.fuchs@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: bad COPY performance with NOTIFY in a trigger
Date: Fri, 05 Feb 2016 09:40:44 +0100
Message-ID: <87fux77do3.fsf@hf.protecting.net> (raw)
References: <CAP_rwwmpzk9=SbjRZTOd05bDctyC43wNKnu_m37dYGvL4SAeSw@mail.gmail.com>
<5721.1454625673@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Tom Lane <tgl@sss.pgh.pa.us> writes:
> 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.
@Filip: you probably want a per-statement trigger rather than a per-row
trigger: insert all rows with COPY, then send one notification.
You have to mark the new rows somehow yourself; unfortunately PostgreSQL
has no way to tell them in a statement trigger.
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: hari.fuchs@gmail.com
Subject: Re: bad COPY performance with NOTIFY in a trigger
In-Reply-To: <87fux77do3.fsf@hf.protecting.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox