Re: bad COPY performance with NOTIFY in a trigger

From: Harald Fuchs
Subject: Re: bad COPY performance with NOTIFY in a trigger
Date: ,
Msg-id: 87fux77do3.fsf@hf.protecting.net
(view: Whole thread, Raw)
In response to: bad COPY performance with NOTIFY in a trigger  (Filip Rembiałkowski)
List: pgsql-performance

Tree view

bad COPY performance with NOTIFY in a trigger  (Filip Rembiałkowski, )
 Re: bad COPY performance with NOTIFY in a trigger  (Tom Lane, )
  Re: bad COPY performance with NOTIFY in a trigger  (Filip Rembiałkowski, )
   Re: bad COPY performance with NOTIFY in a trigger  (Filip Rembiałkowski, )
    Re: bad COPY performance with NOTIFY in a trigger  (Merlin Moncure, )
     Re: bad COPY performance with NOTIFY in a trigger  (Filip Rembiałkowski, )
      Re: bad COPY performance with NOTIFY in a trigger  (Merlin Moncure, )
       Re: bad COPY performance with NOTIFY in a trigger  (Merlin Moncure, )
 Re: bad COPY performance with NOTIFY in a trigger  (Harald Fuchs, )

Tom Lane <> 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.


pgsql-performance by date:

From: Filip Rembiałkowski
Date:
Subject: Re: bad COPY performance with NOTIFY in a trigger
From: Tom Lane
Date:
Subject: Re: gin performance issue.