ANALYZE locks pg_listener in EXCLUSIVE for long time?

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: ANALYZE locks pg_listener in EXCLUSIVE for long time?
Date: 2004-05-03 01:41:22
Message-ID: 6.1.0.6.0.20040503112948.04e2d280@203.8.195.10
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


We are seeing occasional long lockouts from out DB. When I do a 'select *
from pg_locks', I find that everybody is waiting for pg_listener, and that
the lock on pg_listener is currently held by a long-running ANALYZE VERBOSE.

I saw the following in the change logs (not sure if it's relevant):

should have gotten this notify. But to do that, we'd have to wait
to see if he commits or not, or make UNLISTEN hold exclusive lock
on pg_listener until commit. Either of these answers is
deadlock-prone, not to mention horrible for interactive
performance. Do it this way for now. (What happened to that
project to do LISTEN/NOTIFY in memory with no table, anyway?)

Does this mean that ANALYZE will take an exclusive lock on pg_listener
until the ANALYZE finishes? Or is there some other cause?

Any help or suggestions would be appreciated...

----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 03 5330 3172 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp.mit.edu:11371 |/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Claudio Natoli 2004-05-03 02:15:25 Re: Timezone database questions
Previous Message Bruce Momjian 2004-05-03 01:10:08 Re: SET WITHOUT CLUSTER patch