Re: run vacuum from within a function - Mailing list pgsql-general

From Richard Huxton
Subject Re: run vacuum from within a function
Date
Msg-id 43745161.9050101@archonet.com
Whole thread Raw
In response to run vacuum from within a function  (Hugo <htakada@gmail.com>)
List pgsql-general
Hugo wrote:
> hi everybody,
>
> Is it possible tu run vacuum from a plpgsql function ? I have a process that
> copies a lot of data from a csv file with the copy command and at the end of
> the function I would like to force a vacuun, is that possible.

I'm afraid not. VACUUM can't run inside a transaction block
(BEGIN..COMMIT) which is automatically the context you have if you are
inside a function.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Guido Neitzer
Date:
Subject: Re: Ordering and unicode
Next
From: Lincoln Yeoh
Date:
Subject: Re: PREPARE TRANSACTION and webapps