520083510237-0001@t-online.de (Peter Eisentraut) writes:
> Tom Lane writes:
>> It'll certainly be necessary for xact abort to restore the original
>> user ID setting. Peter, did you do that already?
> That's done by the setjmp/longjmp, no?
Not automatically, surely. If there is an alterable global variable
containing the effective UID, then you must take care to reset it to
the session value during transaction abort --- ie, somewhere in the
transaction abort processing invoked by AbortTransaction in
backend/access/transam/xact.c. (The same goes for any other
status variable that might be temporarily altered by a transaction,
of course. This is one reason why transient changes in globals are
A Bad Thing to be studiously avoided whenever possible. But sometimes
you gotta have 'em.)
regards, tom lane