Skip site navigation (1) Skip section navigation (2)

Re: Performance of the listen command

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Flemming Frandsen <ff(at)partyticket(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance of the listen command
Date: 2006-07-29 02:09:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Flemming Frandsen wrote:
> 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.

Do you regularly vacuum the pg_listener table?

> 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.

Actually, it does write to disk, because the listen information is kept
on a table.

Alvaro Herrera                      
The PostgreSQL Company - Command Prompt, Inc.

In response to


pgsql-general by date

Next:From: Michael FuhrDate: 2006-07-29 02:43:04
Subject: Re: Performance of the listen command
Previous:From: Reece HartDate: 2006-07-29 00:35:40
Subject: Re: copy losing information

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group