Re: How to crash postgres using savepoints - Mailing list pgsql-bugs

From Tom Lane
Subject Re: How to crash postgres using savepoints
Date
Msg-id 576.1163709311@sss.pgh.pa.us
Whole thread Raw
In response to How to crash postgres using savepoints  (Joseph Shraibman <jks@selectacast.net>)
Responses Re: How to crash postgres using savepoints
Re: How to crash postgres using savepoints
List pgsql-bugs
Joseph Shraibman <jks@selectacast.net> writes:
> See example below. At the very least the documentation needs to tell
> users that savepoints use shared memory, and the cofusing HINT string
> needs to be changed to something more useful.

Which part of "You may need to increase max_locks_per_transaction" do
you find confusing?  If you actually need tens of thousands of nested
savepoints then this is accurate advice.

Actually, I'd say the dubious behavior here is that

    SAVEPOINT foo;
    SAVEPOINT foo;
    SAVEPOINT foo;

creates three nested savepoints ... it might be better if it
automatically released any existing savepoint of the same name.
I notice that the SAVEPOINT reference page says the latter is
the behavior required by the SQL spec.  Did we explicitly decide
to do this differently from spec, and if so why?

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: 8.2beta1 (w32): server process crash (tsvector)
Next
From: Joseph Shraibman
Date:
Subject: Re: How to crash postgres using savepoints