Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id DEED6632193 for ; Wed, 7 Jan 2009 21:31:01 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 66470-03 for ; Wed, 7 Jan 2009 21:30:43 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 3B82B6311A6 for ; Wed, 7 Jan 2009 21:30:32 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id n081UIu18076; Wed, 7 Jan 2009 20:30:18 -0500 (EST) From: Bruce Momjian Message-Id: <200901080130.n081UIu18076@momjian.us> Subject: Re: Incorrect description of xmax and xip in functions docs In-Reply-To: <1220856995.3913.62.camel@ebony.2ndQuadrant> To: Simon Riggs Date: Wed, 7 Jan 2009 20:30:18 -0500 (EST) CC: pgsql-docs , Jan Wieck X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200901/1 X-Sequence-Number: 5037 Simon Riggs wrote: > > On Sun, 2008-09-07 at 08:31 -0400, Bruce Momjian wrote: > > Simon Riggs wrote: > > > > > > On Sat, 2008-09-06 at 21:31 -0400, Bruce Momjian wrote: > > > > Applied, and attached. > > > > > > Thanks. > > > > > > > > And for txid_visible_in_snapshot() comment added: > > > > > "Function should not be used with subtransaction xids. It is possible > > > > > that this function will return a true result for a subtransaction xid > > > > > that was actually still in progress at the time of the snapshot". > > > > > > > > I think the cleaner solution is to throw an appropriate error if a > > > > subtransaction xid is used, rather than adding documentation. > > > > > > Or maybe check subtrans for it, as it really should be doing. > > > > Yea, that's what I meant. You can't be sure everyone is going to read > > the documentation but they are sure to see the function results or error > > message. > > In fact, neither is possible. We cannot assume subtrans is available on > the system on which the check is made, neither can we identify which > xids are subtransactions and which are not. > > 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? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +