Frank Kardel <Frank.Kardel@Acrys.COM> writes:
> As we need to recover from failed statements on statement level we
> encapsulate
> our statements with SAVEPOINT/RELEASE savepoint statements.
How are you doing that exactly? The style
begin;
savepoint x;
...
release x;
savepoint x;
...
release x;
savepoint x;
...
release x;
savepoint x;
...
release x;
...
commit;
works with minimal leakage AFAICT. If you are nesting the savepoints
then of course it's going to bloat: it has to be able to recover to any
one of the open savepoints, so there has to be some amount of state
associated with each one.
If you think that's what you are doing, let's see a self-contained
example. You might be invoking some specific feature that has a
memory leak.
It's also a good idea to mention the exact PG version you are using
in such complaints ...
regards, tom lane