X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D8BEED1E13E for ; Sun, 16 Nov 2003 22:56:17 +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 26154-08 for ; Sun, 16 Nov 2003 18:55:49 -0400 (AST) Received: from bob.samurai.com (bob.samurai.com [205.207.28.75]) by svr1.postgresql.org (Postfix) with ESMTP id BCF0ED1B555 for ; Sun, 16 Nov 2003 18:55:46 -0400 (AST) Received: from tokyo.samurai.com (d226-89-59.home.cgocable.net [24.226.89.59]) by bob.samurai.com (Postfix) with ESMTP id 4FDF71E37; Sun, 16 Nov 2003 17:55:42 -0500 (EST) To: Hannu Krosing Cc: Tom Lane , Will LaShell , Christopher Browne , "pgsql-hackers@postgresql.org" Subject: Re: start of transaction (was: Re: [PERFORM] Help with count(*)) From: Neil Conway In-Reply-To: <1068983887.17671.10.camel@fuji.krosing.net> (Hannu Krosing's message of "Sun, 16 Nov 2003 13:58:08 +0200") 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> <1068983887.17671.10.camel@fuji.krosing.net> Date: Sun, 16 Nov 2003 17:55:41 -0500 Message-ID: <873ccnc49e.fsf@mailbox.samurai.com> User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/853 X-Sequence-Number: 47141 Hannu Krosing writes: > For me, the "start of transaction" is not about time, but about grouping > a set of statements into one. So making the exact moment of "start" be > the first statement that actually does something with data seems > perfectly reasonable. This might be a perfectly logical change in semantics, but what benefit does it provide over the old way of doing things? What does BEGIN actually do now, from a user's perspective? At present, it "starts a transaction block", which is pretty simple. If we adopted the proposed change, it would "change the state of the system so that the next command is part of a new transaction". This is naturally more complex; but more importantly, what benefit does it ACTUALLY provide to the user? (I can't see one, but perhaps I'm missing something...) > Delaying the locking effects of transactions as long as possible can > increase performance overall, not just for pathological clients that sit > on idle open transactions. I agree, but this is irrelevant to the semantics of now(). -Neil