Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fj15S-0006rq-0x for pgsql-sql@arkaria.postgresql.org; Fri, 27 Jul 2018 11:39:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fj15N-0003YQ-Mw for pgsql-sql@arkaria.postgresql.org; Fri, 27 Jul 2018 11:39:05 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fj15N-0003YJ-DJ for pgsql-sql@lists.postgresql.org; Fri, 27 Jul 2018 11:39:05 +0000 Received: from mail.i-mark.de ([188.138.104.222]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fj15K-0004Dg-Ff for pgsql-sql@lists.postgresql.org; Fri, 27 Jul 2018 11:39:04 +0000 Received: from [192.168.178.20] (unknown [185.38.49.16]) by mail.i-mark.de (Postfix) with ESMTPSA id AEB1B1580186 for ; Fri, 27 Jul 2018 13:38:55 +0200 (CEST) Authentication-Results: loft7616.startdedicated.de; spf=pass (sender IP is 185.38.49.16) smtp.mailfrom=andreas@a-kretschmer.de smtp.helo=[192.168.178.20] Received-SPF: pass (loft7616.startdedicated.de: connection is authenticated) Subject: Re: Regarding vacuumdb To: pgsql-sql@lists.postgresql.org References: From: Andreas Kretschmer Message-ID: <3b94742e-8d77-5761-474c-cebabb3504a6@a-kretschmer.de> Date: Fri, 27 Jul 2018 13:38:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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