Re: Performance of the listen command - Mailing list pgsql-general

From Flemming Frandsen
Subject Re: Performance of the listen command
Date
Msg-id 44CB3BFE.40909@partyticket.net
Whole thread Raw
In response to Re: Performance of the listen command  (Michael Fuhr <mike@fuhr.org>)
Responses Re: Performance of the listen command  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
Michael Fuhr wrote:
> Also, based on a 60ms-per-listen time I suspect you're not doing
> the listens in a transaction, so each listen is its own transaction
> that has to be committed, resulting in a disk hit.  Try doing them
> all in one transaction.

I think I am doing the listens in a transaction, as I connect via DBI
with AutoCommit=>0, unless there is some bug that causes the listens to
not start a new transaction when using DBI.


I also see a problem with the first query I run in a transaction, it
takes a very long time, even if it's simply a "select 6*7", I'm guessing
this is because a new transaction is started, is there any way to
improve performance of that?


Alvaro Herrera wrote:
 > Do you regularly vacuum the pg_listener table?

No, but this is on a system that has been running for a couple of days.

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


pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Performance of the listen command
Next
From: "Alistair Bayley"
Date:
Subject: Re: What's special about 1916-10-01 02:25:20? Odd jump in internal timestamptz representation