| From: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
|---|---|
| To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: A bad behavior under autocommit off mode |
| Date: | 2003-03-19 23:55:27 |
| Message-ID: | 3E79036F.59A72CAD@tpf.co.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 Inoue
http://www.geocities.jp/inocchichichi/psqlodbc/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Stark | 2003-03-20 00:04:33 | Re: request for sql3 compliance for the update command |
| Previous Message | Brian Bruns | 2003-03-19 23:19:22 | Re: Roadmap for FE/BE protocol redesign |