Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1864065065D for ; Tue, 15 Jul 2008 05:25:50 -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 90029-03 for ; Tue, 15 Jul 2008 05:25:38 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mk-outboundfilter-4.mail.uk.tiscali.com (mk-outboundfilter-4.mail.uk.tiscali.com [212.74.114.32]) by postgresql.org (Postfix) with ESMTP id 1E97E65061F for ; Tue, 15 Jul 2008 05:25:40 -0300 (ADT) X-Trace: 111516730/mk-outboundfilter-2.mail.uk.tiscali.com/F2S/$F2S-NILDRAM-ACCEPTED/f2s-temporary-group/85.211.229.155 X-SBRS: None X-RemoteIP: 85.211.229.155 X-IP-MAIL-FROM: simon@2ndquadrant.com X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArQAADz8e0hV0+Wb/2dsb2JhbAAIrXY X-IronPort-AV: E=Sophos;i="4.30,365,1212361200"; d="scan'208";a="111516730" X-IP-Direction: IN Received: from 85-211-229-155.dyn.gotadsl.co.uk (HELO [192.168.0.3]) ([85.211.229.155]) by smtp.f2s.tiscali.co.uk with ESMTP; 15 Jul 2008 09:25:38 +0100 Subject: Re: [PATCHES] WIP: executor_hook for pg_stat_statements From: Simon Riggs To: ITAGAKI Takahiro Cc: Tom Lane , pgsql-hackers@postgresql.org In-Reply-To: <20080715150758.3016.52131E4D@oss.ntt.co.jp> References: <13432.1215720702@sss.pgh.pa.us> <1216097491.19656.44.camel@ebony.2ndQuadrant> <20080715150758.3016.52131E4D@oss.ntt.co.jp> Content-Type: text/plain Date: Tue, 15 Jul 2008 09:31:29 +0100 Message-Id: <1216110689.19656.132.camel@ebony.2ndQuadrant> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.035 tagged_above=0 required=5 tests=AWL=0.035 X-Spam-Level: X-Archive-Number: 200807/720 X-Sequence-Number: 120980 On Tue, 2008-07-15 at 16:25 +0900, ITAGAKI Takahiro wrote: > > > Also, after looking at the patch more closely, was there a good > reason > > > for making the hook intercept ExecutePlan rather than ExecutorRun? > > > > That raises the question of whether we should have ExecutorStart() > and > > ExecutorEnd() hooks as well, to round things off. > > Yeah, and also ExecutorRewind() hook. There are 4 interface functions > in executor. My addin only needs Run hook because it doesn't modify > the actual behavior of executor. However, when someone hope to replace > the behavior, they need all of the hooks. (Is multi-threaded executor > project still alive?) No plans here, just thinking: if we do it, do it once. The reason I wasn't thinking about the rewind part though was it seems like someone might want to set up or tear down something at appropriate times, so adding Start/End felt "obvious". Yes, lets have Rewind also. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support