Re: how to shrink pg_attribute table in some database

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Artem Tomyuk <admin(at)leboutique(dot)com>
Cc: Keith <keith(at)keithf4(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: how to shrink pg_attribute table in some database
Date: 2018-03-26 14:17:56
Message-ID: 20180326141756.GB708@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, Mar 26, 2018 at 05:15:14PM +0300, Artem Tomyuk wrote:
> For now pg_attribute bloated to 300GB in size, and we have only 260GB's of
> free space on disk.
> In normal situation pg_attribute takes 50mb in size for our DB...
> Can we assume that if we will run vacuum full on pg_attribute it will take
> additional 50MB on disk?

You can estimate by doing:

create table z as select * from pg_Attribute;

and then checking size of z.

bloat there suggests that you have huge churn in tables - like: create
table, drop table, lots of times.

Best regards,

depesz

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Artem Tomyuk 2018-03-26 14:33:19 Re: how to shrink pg_attribute table in some database
Previous Message Artem Tomyuk 2018-03-26 14:15:14 Re: how to shrink pg_attribute table in some database