Re: transaction control in pl/pgsql

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Birgit Laggner <birgit(dot)laggner(at)vti(dot)bund(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: transaction control in pl/pgsql
Date: 2010-04-01 11:05:04
Message-ID: w2o2f4958ff1004010405xb4107767v7ac54fbdafcd8f4b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/4/1 Birgit Laggner <birgit(dot)laggner(at)vti(dot)bund(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2010-04-01 11:05:52 Re: prevent connection using pgpass.conf
Previous Message Birgit Laggner 2010-04-01 10:56:03 Re: transaction control in pl/pgsql