From: Joel Stevenson <joelstevenson@mac.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: LISTEN / NOTIFY performance in 8.3
Date: Mon, 25 Feb 2008 11:15:44 -0800
Message-ID: <p06240810c3e8c142182c@[192.168.0.9]> (raw)
In-Reply-To: <29568.1203963194@sss.pgh.pa.us>
References: <p0624080ec3e8ade18d73@[192.168.0.9]>
<29568.1203963194@sss.pgh.pa.us>
At 1:13 PM -0500 2/25/08, Tom Lane wrote:
>Joel Stevenson <joelstevenson@mac.com> writes:
>>> Also, it might be worth enabling log_lock_waits to see if the slow
>>> notifies are due to having to wait on some lock or other.
>
>> Turning on log_lock_waits shows that there is a lot of waiting for
>> locks on the pg_listener table ala:
>
>Interesting. The LISTEN/NOTIFY mechanism itself takes ExclusiveLock
>on pg_listener, but never for very long at a time (assuming pg_listener
>doesn't get horribly bloated, which we know isn't happening for you).
>
>Another thought that comes to mind is that maybe the delays you see
>come from these lock acquisitions getting blocked behind autovacuums of
>pg_listener. I did not see that while trying to replicate your problem,
>but maybe the issue requires more update load on pg_listener than the
>test script can create by itself, or maybe some nondefault autovacuum
>setting is needed --- what are you using?
Default autovacuum settings.
I turned on all autovacuum logging and cranked up the test script and
have it fork 25 consumers each running 25 iterations. At that level
on my machine I can get the lock waiting to exceed the 1s
deadlock_timeout right away but the autovacuum activity on
pg_listener is entirely absent until the end when the forked
consumers are mostly done and disconnected.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: joelstevenson@mac.com, tgl@sss.pgh.pa.us
Subject: Re: LISTEN / NOTIFY performance in 8.3
In-Reply-To: <p06240810c3e8c142182c@[192.168.0.9]>
References: <p0624080ec3e8ade18d73@[192.168.0.9]> <29568.1203963194@sss.pgh.pa.us> <p06240810c3e8c142182c@[192.168.0.9]>
* 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