Re: [PL/pgSQL] Commit every N rows. Is it possible ?

From: "Jeremiasz Miedzinski" <jmiedzinski(at)gmail(dot)com>
To: "Richard Huxton" <dev(at)archonet(dot)com>
Cc: "PostgreSQL Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: [PL/pgSQL] Commit every N rows. Is it possible ?
Date: 2006-11-10 14:37:01
Message-ID: d0f7f1a80611100637t29768157k81e6f1287e33bf97@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2006/11/9, Richard Huxton <dev(at)archonet(dot)com>:

>
> It's not clear to me why your function does what it does anyway. I can't
> see why you wouldn't just do this as standard queries.
>

As it was mentioned on http://orafaq.com/faqplsql.htm

Contrary to popular believe, one should *COMMIT less frequently* within a
PL/SQL loop to prevent ORA-1555 (Snapshot too old) errors. The higher the
frequency of commit, the sooner the extents in the rollback segments will be
cleared for new transactions, causing ORA-1555 errors.

So, I understand that if function/procedure in postgreSQL is treated as one
transaction I can for example execute 15000 delete queries and nothing
similar to ORA-1555 shouldn't happen.

Kind Regards.

--
-- audi vide sile --

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Teodor Sigaev 2006-11-10 15:05:37 Re: tsearch2() with data from other table
Previous Message Marcus Engene 2006-11-10 14:28:02 Re: tsearch2() with data from other table