Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8CBC137C10F for ; Mon, 6 Oct 2008 03:59:33 -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 82509-10 for ; Mon, 6 Oct 2008 03:59:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail137158.authsmtp.com (outmail137158.authsmtp.com [62.13.137.158]) by postgresql.org (Postfix) with ESMTP id 98E5A37C0C7 for ; Mon, 6 Oct 2008 03:59:28 -0300 (ADT) Received: from mail-c193.authsmtp.com (mail-c193.authsmtp.com [62.13.128.118]) by punt10.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m966wppQ004466; Mon, 6 Oct 2008 07:58:51 +0100 (BST) Received: from [192.168.0.3] (85-211-226-179.dyn.gotadsl.co.uk [85.211.226.179]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m966woAV016537; Mon, 6 Oct 2008 07:58:50 +0100 (BST) Subject: Re: Subtransaction commits and Hot Standby From: Simon Riggs To: Alvaro Herrera Cc: Heikki Linnakangas , pgsql-hackers In-Reply-To: <20081005185110.GC4266@alvh.no-ip.org> References: <1221566023.3913.1823.camel@ebony.2ndQuadrant> <48CFBC34.5010802@enterprisedb.com> <20080916141148.GA9229@alvh.no-ip.org> <1221749959.3913.2451.camel@ebony.2ndQuadrant> <1222206431.4445.493.camel@ebony.2ndQuadrant> <1222260525.4445.557.camel@ebony.2ndQuadrant> <1222292659.4445.650.camel@ebony.2ndQuadrant> <20081005185110.GC4266@alvh.no-ip.org> Content-Type: text/plain Date: Mon, 06 Oct 2008 08:00:31 +0100 Message-Id: <1223276431.14099.22.camel@ebony.2ndQuadrant> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: 3b0a21d1-9374-11dd-8a51-002264978518 X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadRtFaANbYlpF HGQLW1xEUFp7XGt/ bgofZQBDYEtPQQdo VlZIRVtNFgBqBAMB SEMXVB81KHQgeH92 YEVlEHJbWkI0dhR9 E0xVQWwbbGRnbH0e URQMagsFdQJXfh9H aFZ7XXQFZGQPKBg1 TUcIIjotJzxZMy1e XgAKKxoZRkMOHyIn DxkEEX0PGlFNfDk6 KRAsOzYy X-Authentic-SMTP: 61633235383639.pelican.dmpriest.net.uk:1378/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: 200810/194 X-Sequence-Number: 125211 On Sun, 2008-10-05 at 14:51 -0400, Alvaro Herrera wrote: > Simon Riggs wrote: > > > OK, spent long time testing various batching scenarios for this using a > > custom test harness to simulate various spreads of xids in transaction > > trees. All looks fine now. > > I had a look and was mostly rephrasing some comments and the README > (hopefully I didn't make any of them worse than they were), when I > noticed that the code to iterate thru pages could be refactored. I > think the change makes the algorithm in TransactionIdSetTreeStatus > easier to follow. OK, thanks for the review. > I also noticed that TransactionIdSetPageStatus has a "subcommit" arg > which is unexplained. I sort-of understand the point, but I think it's > better that you fill in the explanation in the header comment (marked > with XXX) I'll explain some more in the code, and in the README with worked examples of what we need to do and why. > I hope I didn't break the code with the new function > set_tree_status_by_pages -- please recheck that part. Eyeballs OK. > I didn't test this beyond regression tests. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support