pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: samantha mahindrakar <sam.mahindrakar@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Too many commands in a transaction
Date: Tue, 1 Apr 2008 16:58:21 -0400
Message-ID: <f0c828c40804011358l64be003q74880f93cd4dc352@mail.gmail.com> (raw)

Hi
Iam getting the below error when iam running my program.
ERROR: cannot have more than 2^32-1 commands in a transaction
SQL state: 54000
If iam not wrong this error ocuurs when there are too many statements executing
in one single transaction.
But this error is occuring in a function that iam least expecting it
to occur in. The function it occurs in is as follows:
BEGIN
        resultindex := 1;

        -- Go through summedprobs, find where rnum falls, set resultindex
        FOR i IN REVERSE (array_upper(summedprobs,1)-1)..1 LOOP
                IF rnum >= summedprobs[i] AND rnum <= summedprobs[i+1] THEN
                        resultindex := i;
                END IF;
        END LOOP;


        RETURN (dobs[resultindex]);
        EXCEPTION  WHEN program_limit_exceeded THEN
                RAISE NOTICE 'Exception in GETRES';
        RETURN (dobs[resultindex]);
END;


Is is beacuse of the REVERSE command? or because the program is
executiung many select and update statements?
Catching the exception isnt helping here either.Can anyone explain me
why  this error occurs and what i can do to resolve it?


Thanks
Sam



Message-ID: <f0c828c40804011358l64be003q74880f93cd4dc352@mail.gmail.com>
Permalink:  ../f0c828c40804011358l64be003q74880f93cd4dc352@mail.gmail.com/
Also on:    postgresql.org/message-id/f0c828c40804011358l64be003q74880f93cd4dc352@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: sam.mahindrakar@gmail.com
  Subject: Re: Too many commands in a transaction
  In-Reply-To: <f0c828c40804011358l64be003q74880f93cd4dc352@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox