Performance of the listen command

From: Flemming Frandsen <ff(at)partyticket(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Performance of the listen command
Date: 2006-07-28 21:01:09
Message-ID: 44CA7B15.6060004@partyticket.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I cache a lot of data in the application, to invalidate that cache I
have triggers that use notify to let new transactions eject the objects
from the cache.

My problem with listen is that when I start a new connection I run a
listen command for each of my tables, that loop takes around 10 seconds
to complete and I have around 150 tables.

The strange thing is that just about any query runs in 1-4ms, but the
listen command, which shouldn't even have to touch the disk takes around
60ms.

Is it normal for listen to be so slow?

... and what can be done to help the situation?

--
Regards Flemming Frandsen - http://dion.swamp.dk - YAPH

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alistair Bayley 2006-07-28 21:05:14 Re: What's special about 1916-10-01 02:25:20? Odd jump in internal timestamptz representation
Previous Message Martijn van Oosterhout 2006-07-28 20:30:57 Re: Questions about update, delete, ctid...