Re: ANALYZE locks pg_listener in EXCLUSIVE for long time?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ANALYZE locks pg_listener in EXCLUSIVE for long time?
Date: 2004-05-03 03:46:09
Message-ID: 4310.1083555969@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Philip Warner <pjw(at)rhyme(dot)com(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-05-03 03:56:00 Re: ANALYZE locks pg_listener in EXCLUSIVE for long time?
Previous Message Philip Warner 2004-05-03 03:35:18 Re: ANALYZE locks pg_listener in EXCLUSIVE for long