Re: Commit within a PL/PGSQL procedure - Mailing list pgsql-novice

From Josh Berkus
Subject Re: Commit within a PL/PGSQL procedure
Date
Msg-id 200306170910.07015.josh@agliodbs.com
Whole thread Raw
In response to Re: Commit within a PL/PGSQL procedure  (Harry Broomhall <harry.broomhall@uk.easynet.net>)
Responses Re: Commit within a PL/PGSQL procedure  (Harry Broomhall <harry.broomhall@uk.easynet.net>)
List 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

pgsql-novice by date:

Previous
From: Harry Broomhall
Date:
Subject: Re: Commit within a PL/PGSQL procedure
Next
From: Tom Lane
Date:
Subject: Re: Commit within a PL/PGSQL procedure