Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5D19264FD67 for ; Mon, 7 Jul 2008 04:04:59 -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 18837-06 for ; Mon, 7 Jul 2008 04:04:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail128092.authsmtp.net (outmail128092.authsmtp.net [62.13.128.92]) by postgresql.org (Postfix) with ESMTP id 2EF4164FD63 for ; Mon, 7 Jul 2008 04:04:54 -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 m6774iuc000783; Mon, 7 Jul 2008 08:04:44 +0100 (BST) Received: from [192.168.0.3] (85-211-229-155.dyn.gotadsl.co.uk [85.211.229.155]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m6774am0064159; Mon, 7 Jul 2008 08:04:37 +0100 (BST) Subject: Re: [PATCHES] WIP: executor_hook for pg_stat_statements From: Simon Riggs To: ITAGAKI Takahiro Cc: pgsql-hackers@postgresql.org In-Reply-To: <20080707104202.73E5.52131E4D@oss.ntt.co.jp> References: <20080623150535.946E.52131E4D@oss.ntt.co.jp> <1215161065.4051.26.camel@ebony.site> <20080707104202.73E5.52131E4D@oss.ntt.co.jp> Content-Type: text/plain Date: Mon, 07 Jul 2008 08:10:00 +0100 Message-Id: <1215414601.4051.432.camel@ebony.site> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: f616745c-4bf2-11dd-8155-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaAJbZ0xd HGQLW1xEUFV7WWd/ aA0fZQBDYEtPQQdo WVZIR1dNFgBqBAMB SEMYVR52JlhGeHh0 ZENrEHFeWE00I0B8 RElQED4bYTU2an0e URQMagtVdQZXfh9E a1h6AHAKZjZWKBg1 TUcABxkNFhVyExEd fSA1fxofUUsAAyI7 XScCGjIsVUMCXW0r ICs9NlcAK10NO1k/ NFYnRUlw X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:1078/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-Archive-Number: 200807/271 X-Sequence-Number: 120531 On Mon, 2008-07-07 at 11:03 +0900, ITAGAKI Takahiro wrote: > Simon Riggs wrote: > > > > The attached patch (executor_hook.patch) modifies HEAD as follows. > > > > > > - Add "tag" field (uint32) into PlannedStmt. > > > - Add executor_hook to replace ExecutePlan(). > > > - Move ExecutePlan() to a global function. > > > > The executor_hook.patch is fairly trivial and I see no errors. > > > > The logic of including such a patch is clear. If we have a planner hook > > then we should also have an executor hook. > > One issue is "tag" field. The type is now uint32. It's enough in my plugin, > but if some people need to add more complex structures in PlannedStmt, > Node type would be better rather than uint32. Which is better? I was imagining that tag was just an index to another data structure, but probably better if its a pointer. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support