Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0UKT-0002HQ-UF for pgsql-admin@arkaria.postgresql.org; Mon, 26 Mar 2018 15:46:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f0UKS-0005hQ-J7 for pgsql-admin@arkaria.postgresql.org; Mon, 26 Mar 2018 15:46:36 +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 1f0UKS-0005hG-87 for pgsql-admin@lists.postgresql.org; Mon, 26 Mar 2018 15:46:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0UKP-00022R-S9 for pgsql-admin@postgresql.org; Mon, 26 Mar 2018 15:46:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w2QFkLV2028176; Mon, 26 Mar 2018 11:46:21 -0400 From: Tom Lane To: Artem Tomyuk cc: Hubert Lubaczewski , Keith , pgsql-admin Subject: Re: how to shrink pg_attribute table in some database In-reply-to: References: <20180326141756.GB708@depesz.com> <20180326152425.GA23643@depesz.com> <20180326153337.GA8484@depesz.com> Comments: In-reply-to Artem Tomyuk message dated "Mon, 26 Mar 2018 18:41:48 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28174.1522079181.1@sss.pgh.pa.us> Date: Mon, 26 Mar 2018 11:46:21 -0400 Message-ID: <28175.1522079181@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Artem Tomyuk writes: > There was broken query that every time was creating temp table and than was > trying to insert into this table some data in another query but within > single connection, what happened next that second query was unable to be > executed because of syntax error (yes, human factor), this query was > repeated every minute by cron 24/7. One temp table per minute doesn't explain this amount of bloat, unless autovacuum had failed to process pg_attribute for a really really long time. It would be good to figure out why that happened. regards, tom lane