public inbox for [email protected]
help / color / mirror / Atom feedFrom: Simon Riggs <[email protected]>
To: Bruce Momjian <[email protected]>
Cc: pgsql-docs <[email protected]>
Cc: Jan Wieck <[email protected]>
Subject: Re: Incorrect description of xmax and xip in functions docs
Date: Thu, 08 Jan 2009 08:19:19 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On Wed, 2009-01-07 at 20:30 -0500, Bruce Momjian wrote:
> > The only way is to document it.
>
> Sorry, I am just getting back to this. Why would we not know if
> something is a subtransaction or if subtransactions are supported? Are
> you assuming txid_visible_in_snapshot() will be used on different
> servers? What are these txid_* functions for anyway?
You can derive a snapshot and export it using txid_current_snapshot().
http://developer.postgresql.org/pgdocs/postgres/functions-info.html
You can then check whether an xid is in that snapshot by running
txid_visible_in_snapshot(). However, the check is done assuming that the
xid you are checking is a top-level xid and the answer you get is either
yes or no.
There is no allowance made that the xid supplied as a parameter value
may have been a subtrans of one of the top-level xids listed. So the
answer *ought* to have been true, whereas the function will always
return false.
We cannot extend txid_visible_in_snapshot() to answer correctly because
that information is not held within the snapshot datatype, nor is it
held in regular snapshots currently. So the only way to handle this is
to document the limited scope of the answer this function provides.
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support
view thread (9+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Incorrect description of xmax and xip in functions docs
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox