Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1115C64FCD7 for ; Fri, 5 Sep 2008 12:31:35 -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 43570-03 for ; Fri, 5 Sep 2008 12:31:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail128115.authsmtp.com (outmail128115.authsmtp.com [62.13.128.115]) by postgresql.org (Postfix) with ESMTP id AF22D64FCBA for ; Fri, 5 Sep 2008 12:31:30 -0300 (ADT) Received: from mail-c187.authsmtp.com (mail-c187.authsmtp.com [62.13.128.33]) by punt5.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m85FVROC090013 for ; Fri, 5 Sep 2008 16:31:27 +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 m85FVQrh072298 for ; Fri, 5 Sep 2008 16:31:26 +0100 (BST) Subject: Re: Incorrect description of xmax and xip in functions docs From: Simon Riggs To: pgsql-docs In-Reply-To: <1220627662.4371.1203.camel@ebony.2ndQuadrant> References: <1220627662.4371.1203.camel@ebony.2ndQuadrant> Content-Type: text/plain Date: Fri, 05 Sep 2008 16:31:42 +0100 Message-Id: <1220628702.4371.1214.camel@ebony.2ndQuadrant> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: b44a05ac-7b5f-11dd-8155-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MOFUSTAAU PkFRNXJLN0YASktU QCdXRQsWBxNxXHwW PkpObwVdalpPWQ9p UUJLRBxaERtqAB0f BBwXTBB1aAdDentv ZQg/VnUtOiU4LUZ6 QExdHSMEZWZpJjIb VBFYclIHbQQYe0lY a1ErAG4FYGACe3pg RlZjYjxqYmpUITJv T1NFDFQZRlwREzUg DxwPBj41HFUZRiI1 ZxsoYk4ZFVZZO0M+ eUsgQRoZNVccFwtV A0BKBjQRK14KXEJl 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/3 X-Sequence-Number: 4964 On Fri, 2008-09-05 at 16:14 +0100, Simon Riggs wrote: > http://developer.postgresql.org/pgdocs/postgres/functions-info.html > > xip_list is described as > > "Active txids at the time of the snapshot... " > > > This is incorrect. The xip_list is the list of transactions that are in > progress *and* less than xmax. There may be transactions in progress > with an xid higher than xmax. This will happen frequently in fact. This > is because xmax is defined as the highest/latest completed xid, not the > highest running xid. > > Note that there is no way to discover the list of running xids at the > time of the snapshot, from the data we hold about snapshots. Nor can the > snapshot data be used to monitor the number of transactions in progress. > > Anyone disagree? If not, I'll patch. My rewording would be: "Active txids at the time of the snapshot. The list includes only those active txids between xmin and xmax; there may be active txids higher than xmax. A txid that is xmin <= txid < xmax and not in this list was already completed at the time of the snapshot, and thus either visible or dead according to its commit status. The list does not include txids of subtransactions." 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". -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support