Re: long transactions, SAVEPOINTS, performance and memory consumption - Mailing list pgsql-general

From Tom Lane
Subject Re: long transactions, SAVEPOINTS, performance and memory consumption
Date
Msg-id 18071.1126020047@sss.pgh.pa.us
Whole thread Raw
In response to long transactions, SAVEPOINTS, performance and memory consumption  (Frank Kardel <Frank.Kardel@Acrys.COM>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Shared disk storage
Next
From: Michal Hlavac
Date:
Subject: tsearch2 & unicode