Search Postgresql Archives

Re: pg_dump, MVCC and consistency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martijn van Oosterhout <kleptog@xxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux