Re: Nested Transactions in PL/pgSQL

From: "Nykolyn, Andrew" <andrew(dot)nykolyn(at)ngc(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: "John DeSoi" <desoi(at)pgedit(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Nested Transactions in PL/pgSQL
Date: 2007-07-10 17:17:48
Message-ID: F45D63E8C730D04F899B1227D5D03FD81C0C5E@XMBIL101.northgrum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Alvaro Herrera
Sent: Friday, July 06, 2007 9:49 AM
To: Nykolyn, Andrew
Cc: John DeSoi; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Nested Transactions in PL/pgSQL

Nykolyn, Andrew wrote:
> My real issue is not that I need subtransactions but I need to flush
> the buffer so that I can regain memory for my stored procedure to
> complete without getting a memory error.

Normal operation does not "fill buffers", thus they don't need any
flushing. There must be something weird about what your SP is doing.
Can we see it? Are you maybe opening and keeping half-scanned a lot of
cursors? If not, can you explain in much detail what it is doing?

Alvaro,

The stored procedures are long and complicated with recursive routines
and temporary tables and deal with a lot of data. What ended up
happening is that we added another very large chuck of data to the
processing and that gave us the memory error. After looking closer at
the error we upped the max_locks_per_transaction parameter to 256 and
then we were able to execute without an error. Thanks for your help.

Andy Nykolyn
Northrop Grumman

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-07-10 17:46:04 Re: vacuumdb: PANIC: corrupted item pointer
Previous Message Guido Neitzer 2007-07-10 16:52:04 Re: PostGreSQL Replication