Re: transaction control in pl/pgsql

Поиск
Список
Период
Сортировка
От Grzegorz Jaśkiewicz
Тема Re: transaction control in pl/pgsql
Дата
Msg-id w2o2f4958ff1004010405xb4107767v7ac54fbdafcd8f4b@mail.gmail.com
обсуждение исходный текст
Ответ на Re: transaction control in pl/pgsql  (Birgit Laggner <birgit.laggner@vti.bund.de>)
Список 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 по дате отправления:

Предыдущее
От: Birgit Laggner
Дата:
Сообщение: Re: transaction control in pl/pgsql
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: prevent connection using pgpass.conf