From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: New problem with SET/autocommit |
Date: | 2002-10-20 19:57:52 |
Message-ID: | 200210201957.g9KJvqn09218@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
OK, I guess it isn't a problem.
---------------------------------------------------------------------------
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom, you mentioned suppressing the WARNING on COMMIT of an empty
> > transaction would make it hard to know when you are in a transaction,
> > but I was suggesting suppressing the warning only when autocommit was
> > off, so by definition you are always in a transaction, sort of. You are
> > in a transaction, but perhaps an empty one.
>
> I don't understand why you're labeling this behavior as a problem.
> To me, it's the expected behavior, it's useful in debugging, and it
> does not actually break anything. (A WARNING is not an ERROR. Though
> I'd not object if you'd like to downgrade the begin/commit/rollback
> wrong-state WARNINGs to NOTICEs, like they were before.)
>
> > Should it be OK to issue a
> > COMMIT of an empty transaction when autocommit is off?
>
> We need to be careful about adding more and more special cases to
> the transactional rules. The more there are, the more confusing
> and hard-to-maintain the system will be. I don't think this proposed
> special case is justified: it has no value except to suppress a notice.
> Moreover, it's suppressing a notice in a context where the user
> demonstrably has a misunderstanding of the transactional behavior.
> Don't we usually throw notices to try to teach people what they
> may be doing wrong?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-10-21 00:36:06 | Re: /contrib/retep to gborg |
Previous Message | Hunter Hillegas | 2002-10-20 19:05:04 | Buffers and MacOS X |