From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | elein <elein(at)norcov(dot)com>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #1118: Misleading Commit message |
Date: | 2004-03-28 15:23:26 |
Message-ID: | 15664.1080487406@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> PostgreSQL Bugs List wrote:
>> In a block transaction, whether or not there were errors in the transaction
>> issuing a commit; returns a COMMIT confirmation.
> Uh, the tag indicates the COMMIT completed, not that it was a success.
The current philosophy on command tags is "the tag is the same as the
command actually issued". However we are talking about breaking that
rule for EXECUTE, and if we do that, it's hard to say that we should
continue to enforce the rule for COMMIT. It would clearly be useful
for a COMMIT that ends a failed transaction to report ROLLBACK instead.
> If we throw an error on a COMMIT, people willl think we did not close
> the transacction,
... which we wouldn't have. That won't work.
> and if we return a ROLLBACK, they will think they issued a rollback.
Which, in effect, is what they did. Is it likely that this would break
any clients? The intention of the current design rule is that clients
can match the tag against the command they issued, but I don't know of
any client code that actually does that.
In any case, we already have some inconsistencies:
regression=# begin;
BEGIN
regression=# end;
COMMIT
regression=# begin;
BEGIN
regression=# abort;
ROLLBACK
regression=#
so it seems that in some cases we're already following a rule more like
"the tag is the same as the command actually *executed*".
I started out not wanting to make this change either, but the more
I think about it the harder it is to hold that position.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | elein | 2004-03-28 17:37:13 | Re: BUG #1118: Misleading Commit message |
Previous Message | Bruce Momjian | 2004-03-28 03:41:38 | Re: BUG #1118: Misleading Commit message |
From | Date | Subject | |
---|---|---|---|
Next Message | ivan | 2004-03-28 16:43:35 | create type with like |
Previous Message | Matthew T. O'Connor | 2004-03-28 15:10:34 | Re: Timeline for 7.4.3? |