Re: timeout implementation issues - Mailing list pgsql-hackers

From Tom Lane
Subject Re: timeout implementation issues
Date
Msg-id 2284.1018034006@sss.pgh.pa.us
Whole thread Raw
In response to Re: timeout implementation issues  (Jan Wieck <janwieck@yahoo.com>)
Responses Re: timeout implementation issues  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: timeout implementation issues  (Karel Zak <zakkr@zf.jcu.cz>)
List pgsql-hackers
Jan Wieck <janwieck@yahoo.com> writes:
>     If at all, SET commands should behave like  everything  else.
>     If done inside a transaction, they have to rollback.

I have thought of a scenario that may be sufficient to justify fixing
SETs to roll back on transaction abort.  Consider
BEGIN;
CREATE SCHEMA foo;
SET search_path = 'foo, public';
ROLLBACK;

As the code stands, this will leave you with an invalid search path.
(What's worse, if you now execute CREATE TABLE, it will happily create
tables belonging to the vanished namespace foo.  Everything will seem
to work fine ... until you try to find those tables again in a new
session ...)

It seems clear to me that SET *should* roll back on abort.  Just a
matter of how important is it to fix.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: timeout implementation issues
Next
From: Jan Wieck
Date:
Subject: Re: timeout implementation issues