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 7E48DD1B584 for ; Mon, 17 Nov 2003 10:44:24 +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 37760-05 for ; Mon, 17 Nov 2003 06:43:54 -0400 (AST) Received: from smtp-send.myrealbox.com (smtp-send.myrealbox.com [192.108.102.143]) by svr1.postgresql.org (Postfix) with ESMTP id 8EE16D1B536 for ; Mon, 17 Nov 2003 06:43:46 -0400 (AST) Received: from persistent.co.in shridhar_daithankar@smtp-send.myrealbox.com [202.54.11.72] by smtp-send.myrealbox.com with NetMail SMTP Agent $Revision: 3.44 $ on Novell NetWare via secured & encrypted transport (TLS); Mon, 17 Nov 2003 03:43:46 -0700 Message-ID: <3FB8A650.9030603@persistent.co.in> Date: Mon, 17 Nov 2003 16:13:28 +0530 From: Shridhar Daithankar User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "pgsql-hackers@postgresql.org" Subject: Re: start of transaction 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> <26338.1068996163@sss.pgh.pa.us> <87n0avaonp.fsf@mailbox.samurai.com> <3798.1069027704@sss.pgh.pa.us> <1069064165.20092.20.camel@fuji.krosing.net> In-Reply-To: <1069064165.20092.20.camel@fuji.krosing.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/1006 X-Sequence-Number: 47294 Hannu Krosing wrote: > Tom Lane kirjutas E, 17.11.2003 kell 02:08: > >>Neil Conway writes: >> >>>Hmmm... I agree this behavior isn't ideal, although I can see the case >>>for viewing this as a mistake by the application developer: they are >>>assuming that they know exactly when transactions begin, which is not >>>a feature provided by their language interface. >> >>Well, actually, it's a bug in the interface IMHO. But as I said in the >>last thread, it's a fairly widespread bug. > > > I'm not sure that it is a client-side bug. For example Oracle seems to > _always_ have a transaction going, i.e. you can't be "outside" of > transaction, and you use just COMMIT to commit old _and_start_new_ > transaction. > > IIRC the same is true for DB2. Actually, in oracle a new transaction starts with first DDL after a commit. That does not include DML BTW. And Damn.. Actually I recently fixed a "bug" where I had to force a start of transaction in Pro*C, immediately after commit. Otherwise a real start of transaction could be anywhere down the line, causing some weird concurrency issues. Rather than fiddling with oracle support, I would hack my source code, especially this is not the first oracle bug I have worked around....:-( The fact that I couldn't control exact transaction start was such a irritation to put it mildly.. I sooooo missed 'exec sql begin work' in ecpg..:-) >>We've been taking the >>position that the interface libraries should get fixed, and that's not >>happening. It's probably time to look at a server-side fix. I hope that does not compramise transaction control I have with libpq/ecpg etc. And when we are talking about interface libraries, how many of them are within PG control and how many are not? With languages maintenend by postgresql group, it should behave correctly, right? E.g pl/perl,pl/python etc. And for other interface libraries, what are they exactly? php? Can't we just send them a stinker/patch to get that damn thing right(Whatever wrong they are doing. I have kinda lost thread on it..:-) Was it exact time of transaction start v/s now()?) Shridhar