Re: Some problem with the NOTIFY/LISTEN

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: lee Richard <clipper(dot)kenyon(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Some problem with the NOTIFY/LISTEN
Date: 2011-01-19 18:04:16
Message-ID: 23139.1295460256@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

lee Richard <clipper(dot)kenyon(at)gmail(dot)com> writes:
> I am using PG 8.1.4, and my server was stop service, and when I checked the
> log, I found that some process had locked pg_listener in ExclusiveLock, it
> blocked all of the following processes which use NOTIFY/LISTEN. Can anyone
> tell me why pg_listener is locked forever?

NOTIFY and LISTEN do require exclusive locks in PG 8.1, so this report
isn't exactly surprising. Most likely you had some open transaction
that had done one or the other and then gone to sleep.

There is a significant bug fix in 8.1.12 that might or might not have
changed the result for you:
http://archives.postgresql.org/pgsql-patches/2008-03/msg00181.php

A more radical answer would be to upgrade to 9.0, which has a totally
different and much better-performing implementation of LISTEN/NOTIFY.

In any case keep in mind that 8.1.x is now considered EOL and
unsupported. Whether or not you're prepared to make the jump to 9.0
now, you need to think about getting off 8.1. And *especially* about
getting off a four-year-old minor release of 8.1.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-01-19 18:10:31 Re: debug_print_plan logs table alias used in join, not table name itself
Previous Message Jeff Davis 2011-01-19 17:49:55 Re: Need help writing exclusion constraint