From: Andreas Kretschmer <andreas@a-kretschmer.de>
To: pgsql-sql@lists.postgresql.org
Subject: Re: Regarding vacuumdb
Date: Fri, 27 Jul 2018 13:38:58 +0200
Message-ID: <3b94742e-8d77-5761-474c-cebabb3504a6@a-kretschmer.de> (raw)
In-Reply-To: <CAK=G_eugVv6Xnn4=jGePWHPKUx86rXSjg-zOgBri00dM-WPozA@mail.gmail.com>
References: <CAK=G_eugVv6Xnn4=jGePWHPKUx86rXSjg-zOgBri00dM-WPozA@mail.gmail.com>
Am 27.07.2018 um 11:41 schrieb komala pelleti:
> Hi,
>
> We are using postgres 9.5.
>
> Iam not able to call vaccumdb from functions.: function check for
> tables for databse if pct_dead > 100, then we are issuing a vaccum on
> that table.
>
> getting errorĀ .
>
vacuum can't run inside a transaction, and a function is a transaction.
Why not using the autovacuum-feature?
Regards, Andreas
--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com
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-sql@postgresql.org
Cc: andreas@a-kretschmer.de, pgsql-sql@lists.postgresql.org
Subject: Re: Regarding vacuumdb
In-Reply-To: <3b94742e-8d77-5761-474c-cebabb3504a6@a-kretschmer.de>
* 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