Re: ANALYZE locks pg_listener in EXCLUSIVE for long time? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ANALYZE locks pg_listener in EXCLUSIVE for long time?
Date
Msg-id 4310.1083555969@sss.pgh.pa.us
Whole thread Raw
In response to Re: ANALYZE locks pg_listener in EXCLUSIVE for long  (Philip Warner <pjw@rhyme.com.au>)
Responses Re: ANALYZE locks pg_listener in EXCLUSIVE for long  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> If possible, this seems like a great option. We currently have a large 
> database with several hundred users who get locked out for as much as half 
> an hour while ANALYZE runs.

If it takes half an hour to ANALYZE pg_listener, I think that ANALYZE is
not your real problem :-(.  You need a much more aggressive vacuuming
policy on that table.  Maybe a cron job issuing "vacuum pg_listener"
once a minute would do?  And get the size of the table knocked down to
something less stratospheric to begin with --- perhaps stop all the
listeners while you TRUNCATE the table.

The existing listen/notify infrastructure isn't really designed for
notification rates exceeding a few events per minute ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Philip Warner
Date:
Subject: Re: ANALYZE locks pg_listener in EXCLUSIVE for long
Next
From: Tom Lane
Date:
Subject: Re: ANALYZE locks pg_listener in EXCLUSIVE for long time?