Re: [DOCS] Incorrect description of xmax and xip in functions docs

2009-01-08 Thread Simon Riggs

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


-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] Incorrect description of xmax and xip in functions docs

2009-01-08 Thread Bruce Momjian
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  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/func.sgml
===
RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v
retrieving revision 1.468
diff -c -c -r1.468 func.sgml
*** doc/src/sgml/func.sgml	8 Jan 2009 00:44:18 -	1.468
--- doc/src/sgml/func.sgml	8 Jan 2009 14:45:57 -
***
*** 12473,12479 

 txid_visible_in_snapshot(bigint, txid_snapshot)
 boolean
!is transaction ID visible in snapshot?

   
  
--- 12473,12479 

 txid_visible_in_snapshot(bigint, txid_snapshot)
 boolean
!is transaction ID visible in snapshot? (do not use with subtransaction ids)

   
  

-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] Please add REINDEX note to 8.3.5 release notes.

2009-01-08 Thread Bruce Momjian

Done, with the attached patch applied to appropriate back branches.

---

Josh Berkus wrote:
> Folks,
> 
> In the Release Notes for 8.3.5, 8.2.11, and 8.1.15, no mention is made 
> of the need to REINDEX GiST indexes for some users. Please add this 
> sentence to each Migration to Version section.
> 
> Please update soon; people are being confused between the apparent 
> contradiction between the Release Notes and the announcement.
> 
> ---
> 
> E.1.1. Migration to Version 8.3.5
> 
> + If you were previously running version 8.3.4, run REINDEX on all GiST 
> indexes after upgrade.
> 
> ---
> 
> E.7.1. Migration to Version 8.2.11
> 
> + If you were previously running version 8.2.10, run REINDEX on all GiST 
> indexes after upgrade.
> 
> ---
> 
> E.19.1. Migration to Version 8.1.15
> 
> 
> + If you were previously running version 8.1.15, run REINDEX on all GiST 
> indexes after upgrade.
> 
> --
> 
> -- 
> Sent via pgsql-docs mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-docs

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: release.sgml
===
RCS file: /cvsroot/pgsql/doc/src/sgml/release.sgml,v
retrieving revision 1.587
retrieving revision 1.588
diff -c -c -r1.587 -r1.588
*** release.sgml	30 Oct 2008 22:22:24 -	1.587
--- release.sgml	9 Jan 2009 01:47:02 -	1.588
***
*** 1,4 
!