Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zi3c2-0008Bs-OO for pgsql-admin@arkaria.postgresql.org; Fri, 02 Oct 2015 16:55:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zi3c2-0005Ad-AK for pgsql-admin@arkaria.postgresql.org; Fri, 02 Oct 2015 16:55:14 +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.84) (envelope-from ) id 1Zi3aP-0003JC-Hd for pgsql-admin@postgresql.org; Fri, 02 Oct 2015 16:53:33 +0000 Received: from www.commandprompt.com ([2604:da00:2:2:5054:ff:fe07:7618] helo=lists.commandprompt.com) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Zi3aM-0001Eh-1P for pgsql-admin@postgresql.org; Fri, 02 Oct 2015 16:53:31 +0000 Received: from [192.168.1.3] (spinlock.commandprompt.com [69.168.55.30]) by lists.commandprompt.com (Postfix) with ESMTPA id E1D6C56D; Fri, 2 Oct 2015 09:53:28 -0700 (PDT) Received: from c-67-168-169-165.hsd1.wa.comcast.net ([67.168.169.165] helo=[192.168.1.3]) by assp.commandprompt.com with SMTPSA(TLSv1_2 ECDHE-RSA-AES128-GCM-SHA256) (2.4.5); 2 Oct 2015 09:53:28 -0700 Subject: Re: Long-running and non-finishing VACUUM ANALYZE on large table To: Jan , pgsql-admin@postgresql.org References: <560EB550.5050501@j.mk-contact.de> From: "Joshua D. Drake" Organization: Command Prompt, Inc. Message-ID: <560EB689.7040000@commandprompt.com> Date: Fri, 2 Oct 2015 09:53:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <560EB550.5050501@j.mk-contact.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Assp-Version: 2.4.5(15162) on assp.commandprompt.com X-Assp-ID: assp.commandprompt.com m1-04808-10852 X-Assp-Session: 8D714B8 (mail 1) X-Assp-Envelope-From: jd@commandprompt.com X-Assp-Intended-For: pgsql-admin@postgresql.org X-Assp-Intended-For: pgsql.admin@j.mk-contact.de X-Assp-Original-Subject: Re: [ADMIN] Long-running and non-finishing VACUUM ANALYZE on largetable X-Assp-Client-SSL: yes X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On 10/02/2015 09:48 AM, Jan wrote: > Hi everyone, > > I'm currently running PostgreSQL 9.3.6 on Ubuntu 14.04 Server and have > severe problems to get one large table properly vacuumed (16,743,000,000 > reltuples). 16B in a single table? I am not surprised you are having issues. > That is, autovacuum on that table does not finish (even after six days > it is still running). To narrow down the problem, I stopped autovacuum, > temporarily disabled it (but ONLY on that particular table; not a > permanent solution, I know) and started a manual VACUUM ANALYZE on that > table via PGAdmin instead. In analogy to the autovacuum, the manually > started process is also running virtually endless (until I terminate it > after some days) but PGadmin's verbose output (see below) tells me at > least that it (apparently) tries to process the same table over and over > again. I'm definitely not a Postgres guru, but this can't be the > expected behaviour, even on such a big table, right?Did I overlook > something? 178,956,763 row versions to be removed. I have no doubt that it is taking what seems like forever. I strongly suggest you partition this beast. JD -- Command Prompt, Inc. - http://www.commandprompt.com/ 503-667-4564 PostgreSQL Centered full stack support, consulting and development. Announcing "I'm offended" is basically telling the world you can't control your own emotions, so everyone else should do it for you. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin