From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: 'SET LOCAL ROLE blah;' doesn't work? |
Date: | 2007-06-29 02:28:04 |
Message-ID: | 20070629022804.GU7531@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
* Alvaro Herrera (alvherre(at)commandprompt(dot)com) wrote:
> Tom Lane wrote:
> > 2007-06-28 22:02:14.418 EDT 2870 LOG: statement: begin;
> > 2007-06-28 22:02:26.044 EDT 2870 LOG: statement: SAVEPOINT pg_psql_temporary_savepoint
> > 2007-06-28 22:02:26.045 EDT 2870 LOG: statement: set local role tgl;
> > 2007-06-28 22:02:26.047 EDT 2870 LOG: statement: RELEASE pg_psql_temporary_savepoint
> > 2007-06-28 22:02:57.545 EDT 2870 LOG: statement: SAVEPOINT pg_psql_temporary_savepoint
> > 2007-06-28 22:02:57.546 EDT 2870 LOG: statement: show role;
> > 2007-06-28 22:02:57.548 EDT 2870 LOG: statement: RELEASE pg_psql_temporary_savepoint
> >
> > So actually, ON_ERROR_ROLLBACK breaks *any* use of SET LOCAL, not just
> > ROLE. Not sure that this is fixable :-(
>
> Maybe if psql sees "SET LOCAL" it shouldn't send the RELEASE command.
> But it seems a bit error prone to be finding each command that may be
> affected by RELEASE ... what other thing do we have that works at the
> level of subtransactions?
At the very least, anything which does work at the subtransaction level
and not the transaction level should be documented as such... I don't
see anything (perhaps I've missed it) in the 'set local' or the 'release
savepoint' documentation which describes this behavior... :/ Perhaps
I've misunderstood, but generally when we say 'transaction', we're
meaning the a 'full' one and not a savepoint/release in the
documentation. The 'SET LOCAL' documentation even talks explicitly
about COMMIT and ROLLBACK being what causes a reset, RELEASE isn't
mentioned.
Thanks,
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-06-29 02:49:20 | Re: 'SET LOCAL ROLE blah;' doesn't work? |
Previous Message | Stephen Frost | 2007-06-29 02:24:19 | Re: 'SET LOCAL ROLE blah;' doesn't work? |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-06-29 02:29:47 | Re: AutoVacuum Behaviour Question |
Previous Message | Stephen Frost | 2007-06-29 02:24:19 | Re: 'SET LOCAL ROLE blah;' doesn't work? |