Re: Vote totals for SET in aborted transaction

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>
Cc: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Mike Mascari <mascarm(at)mascari(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vote totals for SET in aborted transaction
Date: 2002-04-26 15:49:19
Message-ID: 26599.1019836159@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my> writes:
> I was trying to say that _IF_ one ever needs to "SET" stuff that can't be
> rolled back then it may be better to use some other keyword for that feature.
> I'm actually for #1 SET being rolled back and to not have any "Oracle
> behaviour" settings at all. Anything that can't be rolled back shouldn't
> use SET.

Ah, I understand. Okay, I see a perfect candidate for the other syntax:

ALTER SESSION SET ...

(or whatever the heck that Oracle syntax was). But I'm still looking
for a case of a variable where we actually want this behavior.

The Ingres examples Lee cited were interesting --- but they all appear
to me to correspond to system-wide settings, which we do not allow SET
to modify anyway. (To change system-wide settings, you have to change
postgresql.conf, and then SIGHUP or restart the postmaster. This
ensures all the backends get the word. And indeed this behavior is
outside transactional control.)

I'm still looking for an example of something that is (a) reasonable
to set on a per-backend basis, and (b) not reasonable to roll back
if it's set in a transaction that fails.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2002-04-26 16:58:06 Re: Vote totals for SET in aborted transaction
Previous Message Tom Lane 2002-04-26 15:44:29 Re: pg_constraint