X-Original-To: pgsql-patches-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 58ED89DCA57 for ; Mon, 20 Mar 2006 20:04:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 16909-08 for ; Mon, 20 Mar 2006 20:04:44 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 468969DC94B for ; Mon, 20 Mar 2006 20:04:39 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k2L04eks009192; Mon, 20 Mar 2006 19:04:40 -0500 (EST) To: Bruce Momjian cc: Neil Conway , Brendan Jurd , pgsql-patches@postgresql.org Subject: Re: Additional current timestamp values In-reply-to: <200603202353.k2KNrKr14081@candle.pha.pa.us> References: <200603202353.k2KNrKr14081@candle.pha.pa.us> Comments: In-reply-to Bruce Momjian message dated "Mon, 20 Mar 2006 18:53:20 -0500" Date: Mon, 20 Mar 2006 19:04:40 -0500 Message-ID: <9191.1142899480@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.113 required=5 tests=[AWL=0.113] X-Spam-Score: 0.113 X-Spam-Level: X-Archive-Number: 200603/223 X-Sequence-Number: 19227 Bruce Momjian writes: > Tom Lane wrote: >> The patch as given strikes me as pretty broken --- it does not advance >> statement_timestamp when I would expect (AFAICS it only sets it during >> transaction start). > Uh, it does advance: But not once per statement --- in reality, you get a fairly arbitrary behavior that will advance in some cases and not others when dealing with a multi-statement querystring. Your example showing that it fails to advance in a psql -c string shows this ... don't you think most people would call that a bug? If it's "statement" timestamp then I think it ought to advance once per SQL statement, which this isn't doing. (As I already said, though, that isn't the behavior I really want. My point is just that the code's behavior is an extremely strange, nonintuitive definition of the word "statement".) > I have always been confused if > statement_timeout times queries inside server-side functions, for > example. I don't think it should. That's exactly my point; I agree that we don't want it doing that, but that being the case, "statement" isn't a great name for the units that we are actually processing. We're really wanting to do these things once per client command, or maybe per client query would be a better name. regards, tom lane