Re: BUG #5915: OldSerXidAdd inflates pg_serial too much - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: BUG #5915: OldSerXidAdd inflates pg_serial too much
Date
Msg-id 4D72A89B.1050804@enterprisedb.com
Whole thread Raw
In response to Re: BUG #5915: OldSerXidAdd inflates pg_serial too much  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-bugs
On 04.03.2011 23:28, Kevin Grittner wrote:
> I wrote:
>
>> I think what we're protecting against is disk I/O at COMMIT time,
>> not transaction startup.
>
> One more thought on this -- on a properly configured server, this
> code should rarely be exercised unless there is a long-running READ
> WRITE transaction.  The delay, if any, would be on the connection
> which is committing that long running transaction.

What worries me most is that the cleanup happens while
SerializableXactHashLock is held. It's probably not a big deal in
practice, but it seems safer and probably more readable too to do the
cleanup at checkpoint.

Here's what I had in mind. Can you review, and do you have something to
test this with?

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Attachment

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #5705: btree_gist: Index on inet changes query result
Next
From:
Date:
Subject: Can't use WITH in a PERFORM query in PL/pgSQL?