From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: A bad behavior under autocommit off mode |
Date: | 2003-03-20 04:30:46 |
Message-ID: | 20193.1048134646@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> Bruce Momjian wrote:
>> 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.
I do not like this change either. It breaks long-established behavior
simply to have an easy fix for a recently-introduced bug (and what's
more, a bug in a feature that we may end up removing completely; I like
Peter's idea that autocommit on the client side is a better approach).
It would be a serious error to imagine that psql -c strings are the only
case where this behavior applies. PQexec and interfaces based on it
exhibit the same behavior. The behavior is actually useful for
pipelining (send several queries in one PQsendQuery, read and process
the results one at a time with PQgetResult; then the server's processing
of the additional commands is overlapped with client-side processing of
the results). So I believe there are applications out there depending
on it.
I think we should look for a fix that does not break compatibility.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-03-20 04:32:46 | Re: A bad behavior under autocommit off mode |
Previous Message | Bruce Momjian | 2003-03-20 04:30:42 | Re: Nested transactions: low level stuff |