Re: long transactions, SAVEPOINTS, performance and memory consumption

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Frank Kardel <Frank(dot)Kardel(at)Acrys(dot)COM>
Cc: pgsql-general(at)postgresql(dot)org, seiter(at)Acrys(dot)COM
Subject: Re: long transactions, SAVEPOINTS, performance and memory consumption
Date: 2005-09-06 15:20:47
Message-ID: 18071.1126020047@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Frank Kardel <Frank(dot)Kardel(at)Acrys(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michal Hlavac 2005-09-06 16:06:25 tsearch2 & unicode
Previous Message Bruno Wolff III 2005-09-06 15:13:33 Re: Shared disk storage