Re: [INTERFACES] Roadmap for FE/BE protocol redesign

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [INTERFACES] Roadmap for FE/BE protocol redesign
Date: 2003-03-19 00:54:41
Message-ID: 200303190054.h2J0sgd10636@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

Alvaro Herrera wrote:
> On Tue, Mar 18, 2003 at 05:18:02PM -0500, Bruce Momjian wrote:
> > Peter Eisentraut wrote:
> > > Bruce Momjian writes:
> > >
> > > > What if folks want all their connections autocommit off.
> > >
> > > For interactive use, people can record their preferred setting in
> > > ~/.psqlrc or something like that.
> >
> > But that only works for psql, right? How would this be done at the
> > libpq level? Environment variables? GUC seems a whole lot cleaner.
>
> I think an environment variable would be right. The current method is
> not clean in the sense that a client cannot decide what she wants; she
> just accepts the decision from the DBA. Thus, an application can't be
> written with a certain value in mind, because the DBA can change the
> setting at any time.

The client can say "SET autocommit to off" or on. It can use SHOW to
to see the setting. Environment variables are used mostly for
connecting, and once connected, we use GUC.

In fact, an environment variable seems wrong because it isn't integrated
into the client, like a SET command is.

> Client-side decision is the wiser proposal, I think.
>
> > I understand. I just don't see any value in pushing that logic into
> > each client when we can do it centrally in the server.
>
> The server doesn't know beforehand what the client wants.

True, but GUC seems like the way to go, and we have per-user/db settings
for GUC.

--
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 Neil Conway 2003-03-19 01:25:18 Re: cursors outside transactions
Previous Message postgresql 2003-03-19 00:20:23 mvcc and lock

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bruce Momjian 2003-03-19 21:31:38 Re: [BUGS] Bug #904: Deallocating of prepared statement in ECPG at
Previous Message Alvaro Herrera 2003-03-18 23:15:49 Re: [INTERFACES] Roadmap for FE/BE protocol redesign