Re: transaction control in pl/pgsql - Mailing list pgsql-general

From Grzegorz Jaśkiewicz
Subject Re: transaction control in pl/pgsql
Date
Msg-id w2o2f4958ff1004010405xb4107767v7ac54fbdafcd8f4b@mail.gmail.com
Whole thread Raw
In response to Re: transaction control in pl/pgsql  (Birgit Laggner <birgit.laggner@vti.bund.de>)
List pgsql-general


2010/4/1 Birgit Laggner <birgit.laggner@vti.bund.de>
Hi Grzegorz,

sorry, but that doesn't help me, perhaps you could get a little bit clearer:

@a) Does the use of SAVEPOINT avoid memory overflow? I could not find an
explanation about memory use in the documentation of SAVEPOINT.

transactions don't really use a lot of memory, but you want to keep them short, due to possible locking, etc.
 
@b) Do you mean I should not process my data or I should not use plpgsql
to do that? In what way I'm trying to outsmart the software???


you are trying to save some memory, that database is going to allocated. You can control that much better by writing things the way others do, and by tweaking your config.

What I was trying to say in a), is that you can control transactions in a way - by using savepoints.

You started to talk about saving memory that database might allocate for transactions. This sounds like 'I am trying to be smarter about things than my DB'. Don't do that. It is good to know how things work, and use it wisely, but don't do things for database, since it was designed to take care of memory, and transactions, etc.




--
GJ

pgsql-general by date:

Previous
From: Birgit Laggner
Date:
Subject: Re: transaction control in pl/pgsql
Next
From: Alban Hertroys
Date:
Subject: Re: prevent connection using pgpass.conf