X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D0CA6D1E1A3 for ; Sun, 16 Nov 2003 15:23:13 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 61560-04 for ; Sun, 16 Nov 2003 11:22:46 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id BE0C6D1E19C for ; Sun, 16 Nov 2003 11:22:41 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id hAGFMh19026339; Sun, 16 Nov 2003 10:22:44 -0500 (EST) To: Neil Conway Cc: Will LaShell , Hannu Krosing , Christopher Browne , pgsql-performance@postgresql.org Subject: Re: Help with count(*) In-reply-to: <87isllbcys.fsf@mailbox.samurai.com> References: <200311141251.38786.mallah@trade-india.com> <1068831807.2540.44.camel@fuji.krosing.net> <3FB52FA7.8060508@lashell.net> <4987.1068842326@sss.pgh.pa.us> <87isllbcys.fsf@mailbox.samurai.com> Comments: In-reply-to Neil Conway message dated "Sat, 15 Nov 2003 15:20:43 -0500" Date: Sun, 16 Nov 2003 10:22:43 -0500 Message-ID: <26338.1068996163@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/133 X-Sequence-Number: 4693 Neil Conway writes: > Tom Lane writes: >> (I believe the previous discussion also agreed that we wanted to >> postpone the freezing of now(), which currently also happens at >> BEGIN rather than the first command after BEGIN.) > That doesn't make sense to me: from a user's perspective, the "start > of the transaction" is when the BEGIN is issued, regardless of any > tricks we may play in the backend. That's defensible when the user issued the BEGIN himself. When the BEGIN is coming from some interface library's autocommit logic, it's a lot less defensible. If you consult the archives, you will find actual user complaints about "why is now() returning a very old time?" that we traced to use of interface layers that handle "commit()" by issuing "COMMIT; BEGIN;". When BEGIN actually is issued by live application logic, I'd expect it to be followed immediately by some kind of command --- so the user would be unable to tell the difference in practice. Hannu moved this thread to -hackers, please follow up there if you want to discuss it more. regards, tom lane