Re: Listen / Notify rewrite

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: kleptog(at)svana(dot)org (Martijn van Oosterhout), Joachim Wieland <joe(at)mcknight(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Listen / Notify rewrite
Date: 2009-11-12 01:12:08
Message-ID: 877htwv9ix.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Martijn" == Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:

>> Hi,
>>
>> Attached is a patch for a new listen/notify implementation.
>>
>> In a few words, the patch reimplements listen/notify as an
>> slru-based queue which works similar to the sinval
>> structure. Essentially it is a ring buffer on disk with pages
>> mapped into shared memory for read/write access.

Martijn> While I can't really comment on the implementation, from your
Martijn> description it looks like a big improvement.

Does it cope with the case where a trigger is doing NOTIFY, and you do
a whole-table update, therefore dumping potentially millions of
notifications in at once?

(for example a rare maintenance operation on a table which has a
listen/notify arrangement triggered by single inserts or updates)

The existing implementation copes with that just fine.

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Itagaki Takahiro 2009-11-12 01:13:03 Re: Partitioning option for COPY
Previous Message Andrew Chernow 2009-11-12 01:03:54 Re: Listen / Notify rewrite