Re: I am done

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: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: I am done
Date: 2002-09-02 16:46:10
Message-ID: 200209021646.g82GkAR22754@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> I don't think it *can* be fixed in a reasonable fashion until we have
> >> notification to the client side about what the backend's transaction
> >> state is; which is one of the protocol-change items for 7.4.
>
> > Why can't we just turn on auto-commit when we start the session:
> > SET autocommit = true;
>
> How's that help? If the user turns it off again, we still break.
>
> More to the point, we can hardly claim any level of SQL compliance if
> either libpq or psql try to prevent you from using the autocommit-off
> mode ... but both contain problematic code (mostly in the startup and
> large-object-support areas).
>
> The real problem here is that the client code cannot know how to behave
> (ie, whether to issue BEGIN and/or COMMIT) unless it knows the current
> autocommit setting and current transaction state. And getting that info
> in any reliable fashion requires a protocol change, AFAICS.
>
> There are some things we can tweak to make the clients less broken than
> they are now --- for instance, all of libpq's startup-time SET commands
> could be switched to "BEGIN; SET ...; COMMIT;" which will work the same
> with or without autocommit --- but I don't think we can expect to fix
> large-object support, for example, without the protocol change.

I was considering the original report that createlang doesn't work.
Surely we can do some things to fix those at least. Yes, we clearly
aren't going to get this working 100% in 7.3. I don't even know what to
put on the TODO list because we don't know what cases have problems.

> >> Oh, didn't you put in that patch to provide a GUC level control?
>
> > Yes, but what level do you set it at to turn it off?
>
> FATAL? PANIC?

He doesn't support those levels:

test=> set log_min_error_statement = fatal;
ERROR: invalid value for option 'log_min_error_statement': 'fatal'
test=> set log_min_error_statement = error;
SET

and in fact, the default is ERROR. I think the default has to be
something higher, but even FATAL seems wrong. We have to be able to
turn it off, and have it off by default, rather than saying it only
happens with fatal errors or something like that.

--
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-09-02 18:02:23 Re: [COMMITTERS] pgsql-server/src/include/port hpux.h
Previous Message Rod Taylor 2002-09-02 16:45:26 Re: I am done