Re: Bug #671: server corrupt - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bug #671: server corrupt
Date
Msg-id 20916.1022271216@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug #671: server corrupt  ("Heng Sun" <sunheng@hotmail.com>)
List pgsql-bugs
"Heng Sun" <sunheng@hotmail.com> writes:
> But my question is: will this completely get around the problem of server
> corrupt? In particular, if in a transaction, the "nextval" is called on a
> sequence different from the sequence we are trying to drop, would there be a
> problem? My tests showed NO problem in this situation. Also the analysis
> from Tom Lane seems confirming this. But I am still not sure on this.

I believe there is no problem in that case.  The AccessShareLock held by
the other guy will actually hold off your attempt to drop the sequence
until he commits.  The reason we can see the bug in the single-backend
case is that your own AccessShareLock won't block you from getting the
exclusive lock needed to drop the sequence.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Heng Sun"
Date:
Subject: Re: Bug #671: server corrupt
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #676: lower(), upper(), & initcap() do not work on utf-8 chars