pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joel Stevenson <joelstevenson@mac.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: LISTEN / NOTIFY performance in 8.3
Date: Tue, 26 Feb 2008 18:01:58 -0500
Message-ID: <9501.1204066918@sss.pgh.pa.us> (raw)
In-Reply-To: <p06240818c3ea092cf31b@[192.168.0.9]>
References: <p06240804c3e61871f289@[10.0.1.253]>
	<5576.1203795335@sss.pgh.pa.us>
	<p06240806c3e67e31cbd0@[10.0.1.253]>
	<6730.1203829093@sss.pgh.pa.us>
	<p06240812c3e9ea5ea7f8@[10.0.1.253]>
	<5080.1204047806@sss.pgh.pa.us>
	<p06240818c3ea092cf31b@[192.168.0.9]>

Joel Stevenson <joelstevenson@mac.com> writes:
> What's really baffling is that there are plenty of other OLTP queries 
> going in multiple backends simultaneously that don't fall over my 
> 300ms query log threshold, and yet NOTIFY and LISTEN consistently do. 
> What's more it's looks like it's only happening for registered 
> listener relnames.

Hmm, that says that it's not a matter of locking on pg_listener,
but of actually applying the row update(s) and/or signaling the
recipient(s).  If you're not seeing performance issues for ordinary
table-update operations it's hard to see why pg_listener updates would
be any worse, so that seems to point the finger at the signaling.
Which is just a matter of a kill(2) and shouldn't be that expensive.

It might be interesting to try strace'ing the whole PG process tree
while these notifies are going on, and seeing if you can identify
any specific kernel calls that seem to take a long time.

			regards, tom lane



view thread (19+ messages)  latest in thread

Message-ID: <9501.1204066918@sss.pgh.pa.us>
Permalink:  ../9501.1204066918@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9501.1204066918@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, joelstevenson@mac.com
  Subject: Re: LISTEN / NOTIFY performance in 8.3
  In-Reply-To: <9501.1204066918@sss.pgh.pa.us>

* 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