pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
To: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: start of transaction
Date: Mon, 17 Nov 2003 16:13:28 +0530
Message-ID: <3FB8A650.9030603@persistent.co.in> (raw)
In-Reply-To: <1069064165.20092.20.camel@fuji.krosing.net>
References: <200311141251.38786.mallah@trade-india.com>
	<m3ad6zkpgj.fsf@wolfe.cbbrowne.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>

Hannu Krosing wrote:

> Tom Lane kirjutas E, 17.11.2003 kell 02:08:
> 
>>Neil Conway <neilc@samurai.com> 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




Message-ID: <3FB8A650.9030603@persistent.co.in>
Permalink:  ../3FB8A650.9030603@persistent.co.in/
Also on:    postgresql.org/message-id/3FB8A650.9030603@persistent.co.in

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: shridhar_daithankar@persistent.co.in, pgsql-hackers@postgresql.org
  Subject: Re: start of transaction
  In-Reply-To: <3FB8A650.9030603@persistent.co.in>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox