Re: Commit within a PL/PGSQL procedure

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Harry Broomhall" <harry(dot)broomhall(at)uk(dot)easynet(dot)net>
Cc: harry(dot)broomhall(at)uk(dot)easynet(dot)net, pgsql-novice(at)postgresql(dot)org
Subject: Re: Commit within a PL/PGSQL procedure
Date: 2003-06-17 16:10:07
Message-ID: 200306170910.07015.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Harry,

> The reason I say it runs out of memory is the message:
> ERROR: Memory exhausted in AllocSetAlloc(36)
> in the log file, and I am running 'top' and see the process hit 512MB at
> about this point!

Hmmm ... this is highly unlikely to be becuase of the transaction. When
Postgres runs out of available RAM, it starts swapping to disk ... which can
take hours, but will *not* produce that error.

What did you set your shared_buffers and sort_mem to? What OS are you on?

> In fact my *test* function consists of a simple scan through a database,
> and 3 INSERTs into a new table for each record in the original, where
> the values inserted are derived from values in the original.

Postgresql should be able to handle this regardless of table size, it's just a
question of speed.

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-06-17 16:35:32 Re: Commit within a PL/PGSQL procedure
Previous Message Harry Broomhall 2003-06-17 16:05:27 Re: Commit within a PL/PGSQL procedure