Re: pg_dump, MVCC and consistency - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_dump, MVCC and consistency
Date
Msg-id 13455.1130248303@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump, MVCC and consistency  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Mon, Oct 24, 2005 at 02:42:09PM -0700, Jeff Davis wrote:
>> And what about a transaction left open for 2PC? Does a transaction get a
>> new XID if it's PREPAREd now and COMMIT PREPAREd in a year?

> That I don't know.

A prepared transaction is still open for this purpose (and for purposes
such as holding locks, preventing VACUUM reclamation of tuples, etc).
In practice, leaving prepared transactions hanging around will be just
as socially unfriendly as opening a regular transaction and then sitting
on it.

> Perhaps that's why it's stops a million before overflow.

No, that's to give the DBA some breathing room for recovery.  He needs
enough remaining transaction IDs to do database-wide vacuums (which,
remember, eat an XID per table ... so it's conceivable that even a
million might not be enough ...)

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Prevent application log pollution with notice messages
Next
From: Tom Lane
Date:
Subject: Re: STL problem in stored procedures