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