Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 65F5464FD30 for ; Mon, 8 Sep 2008 03:56:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 56950-10 for ; Mon, 8 Sep 2008 03:56:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail137195.authsmtp.net (outmail137195.authsmtp.net [62.13.137.195]) by postgresql.org (Postfix) with ESMTP id AE94B64FD16 for ; Mon, 8 Sep 2008 03:56:36 -0300 (ADT) Received: from mail-c187.authsmtp.com (mail-c187.authsmtp.com [62.13.128.33]) by punt6.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m886uWvS057986; Mon, 8 Sep 2008 07:56:32 +0100 (BST) Received: from [192.168.0.2] (85-211-229-97.dyn.gotadsl.co.uk [85.211.229.97]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m886uVRB018434; Mon, 8 Sep 2008 07:56:31 +0100 (BST) Subject: Re: Incorrect description of xmax and xip in functions docs From: Simon Riggs To: Bruce Momjian Cc: pgsql-docs In-Reply-To: <200809071231.m87CVmD12043@momjian.us> References: <200809071231.m87CVmD12043@momjian.us> Content-Type: text/plain Date: Mon, 08 Sep 2008 07:56:35 +0100 Message-Id: <1220856995.3913.62.camel@ebony.2ndQuadrant> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: 44cdb1d2-7d73-11dd-8155-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaA1bflxB HGQLW1xEUFp7XGV/ aAgfZQBDYEtPQQdo WVZARU1QEQdtHhxP WxYWVFwUFXdGeXZ0 ZkIsX3ZcWAp+cRUp EE8AF3ABMWBjdWEe BBRFfwJRdR5Kfh5E YlUrV3QKMjRJBC9q VzwfGBsKCH1+Li9S WBsAJk5aTUsQFSQ9 XwwDGjNnGkNNVyA6 P1QvLFJUDEcJekQ0 eVU8X1kEMhgUEUVS GEpWaF9z X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:1186/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! 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: 200809/7 X-Sequence-Number: 4968 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. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support