Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 6B59F650EA9 for ; Fri, 4 Jul 2008 06:08:34 -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 96273-05 for ; Fri, 4 Jul 2008 06:08:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail137064.authsmtp.co.uk (outmail137064.authsmtp.co.uk [62.13.137.64]) by postgresql.org (Postfix) with ESMTP id EE585650E9D for ; Fri, 4 Jul 2008 06:08:28 -0300 (ADT) Received: from mail-c188.authsmtp.com (mail-c188.authsmtp.com [62.13.128.25]) by punt5.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m6498NIJ039332; Fri, 4 Jul 2008 10:08:23 +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 m6498LH4044918; Fri, 4 Jul 2008 10:08:22 +0100 (BST) Subject: Re: WIP: executor_hook for pg_stat_statements From: Simon Riggs To: ITAGAKI Takahiro Cc: pgsql-patches@postgresql.org In-Reply-To: <20080623150535.946E.52131E4D@oss.ntt.co.jp> References: <20080623150535.946E.52131E4D@oss.ntt.co.jp> Content-Type: text/plain Date: Fri, 04 Jul 2008 09:44:25 +0100 Message-Id: <1215161065.4051.26.camel@ebony.site> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: c091c87e-49a8-11dd-aecc-001871e930f4 X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaAFbZ0xd HGQLW1xEUV17WWt/ aQgfZQBDYEtPQQdo WVZIR1dNFgBqBAMB SEMYVhB6C31CeHp0 bEdqEHFfWEw0JkZ0 Qx1cEjgbYW4xYH0e URQMalIBI1BXfh9E Yld+AXoOYTMDKBg1 TUcABxkNFhVyExEd fSA1fxofUUsAAyI7 XScCGjIsVUMCXW0r ICs9NlcAK10NO1k/ NFYnRUlw X-Authentic-SMTP: 61633235383639.cat.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/50 X-Sequence-Number: 6744 On Mon, 2008-06-23 at 15:22 +0900, ITAGAKI Takahiro wrote: > I'm working on light-weight SQL logging for PostgreSQL. > http://archives.postgresql.org/pgsql-hackers/2008-06/msg00601.php > > I divide the SQL logging feature into a core patch and an extension module. > I hope only the patch is to be applied in the core. The extension module > would be better to be developed separately from the core. > > > 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. Will you be completing the plugin for use in contrib? -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support