Re: A bad behavior under autocommit off mode - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject Re: A bad behavior under autocommit off mode
Date
Msg-id 3E79036F.59A72CAD@tpf.co.jp
Whole thread Raw
In response to Re: A bad behavior under autocommit off mode  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: A bad behavior under autocommit off mode  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: A bad behavior under autocommit off mode  (Neil Conway <neilc@samurai.com>)
Re: A bad behavior under autocommit off mode  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Bruce Momjian wrote:
> 
> OK, I have a patch to fix this bug.  The basic problem is that when a
> multi-query string is passed to the backend, it is treated as a single
> transaction _unless_ a transaction or GUC command appears in the string.
> When they appear, a transaction is forced, but the normal transaction
> state machine has been bypassed, meaning in:
> 
>         SET autocommit TO off; SELECT 1; COMMIT;
> 
> when the COMMIT arrives, the transaction state machines hasn't seen the
> SELECT because the mechanism is bypassing the state machine to try and
> get everything into the same transaction.
> 
> This patch removes that "stuff all queries into a single transaction"
> behavior and makes them function just like queries arriving separately.
> This does BREAK BACKWARD COMPATIBILITY.  However, if they want the old
> behavior, they just need to wrap BEGIN/COMMIT around the query string.

Does the change worth the trouble ?
Please don't break BACKWARD COMPATIBILITY easily.

regards,
Hiroshi Inouehttp://www.geocities.jp/inocchichichi/psqlodbc/


pgsql-hackers by date:

Previous
From: Brian Bruns
Date:
Subject: Re: Roadmap for FE/BE protocol redesign
Next
From: Hiroshi Inoue
Date:
Subject: Re: Nested transactions: low level stuff