Re: [webmaster] How to commit/vacuum a batch of delete statements in a postgresql function

From: Nava Jyothi <navajyothimec(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Raghu Ram <raghuiiitb(at)gmail(dot)com>, Amarendra Konda <akonda(at)opentext(dot)com>, Srihari Vanga <srihariv(at)opentext(dot)com>
Subject: Re: [webmaster] How to commit/vacuum a batch of delete statements in a postgresql function
Date: 2015-11-27 04:16:39
Message-ID: CAEX-0tQA_zigxyQCw-J88_ks65RM_83nu4GxEhH35+cG-Z+Q=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

*Hi PostGresSQL TeamCould you advise us on how to commit records in a batch
when one is doing batch wise deletion*. I came across
http://www.postgresql.org/message-id/60644bymua.fsf@dba2.int.libertyrms.com,
but use of vacuum is giving an error as follows from function.

*********** Error **********ERROR: VACUUM cannot be executed from a
function or multi-command stringSQL state: 25001*My stored procedure is of
the format:

*Loop exit when <some condition>
DELETE from incoming_table where xyz='123';
VACUUM incoming_table; -- or commit;
End Loop;*

I thank you for the help.

-Nava

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2015-11-27 08:59:22 Re: 2 questions
Previous Message mrtruji 2015-11-27 03:31:24 Re: Selecting newly added column returns empty but only when selecting with other columns in table