Re: Some problem with the NOTIFY/LISTEN - Mailing list pgsql-general

From Tom Lane
Subject Re: Some problem with the NOTIFY/LISTEN
Date
Msg-id 23139.1295460256@sss.pgh.pa.us
Whole thread Raw
In response to Some problem with the NOTIFY/LISTEN  (lee Richard <clipper.kenyon@gmail.com>)
List pgsql-general
lee Richard <clipper.kenyon@gmail.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

pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Need help writing exclusion constraint
Next
From: Tom Lane
Date:
Subject: Re: debug_print_plan logs table alias used in join, not table name itself