Skip site navigation (1) Skip section navigation (2)

Re: Incorrect description of xmax and xip in functions docs

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-docs <pgsql-docs(at)postgresql(dot)org>, Jan Wieck <JanWieck(at)Yahoo(dot)com>
Subject: Re: Incorrect description of xmax and xip in functions docs
Date: 2009-01-08 14:46:26
Message-ID: 200901081446.n08EkQN10910@momjian.us (view raw or flat)
Thread:
Lists: pgsql-docs
Simon Riggs wrote:
> 
> 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.

Thank you for the clarification;  I know understand.  Patch attached and
applied.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Attachment: /rtmp/diff
Description: text/x-diff (1.0 KB)

In response to

pgsql-docs by date

Next:From: Bruce MomjianDate: 2009-01-09 01:48:17
Subject: Re: Please add REINDEX note to 8.3.5 release notes.
Previous:From: Simon RiggsDate: 2009-01-08 08:19:19
Subject: Re: Incorrect description of xmax and xip in functions docs

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group