Re: pg_toast growth out - PostgreSQL 9.2

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "drum(dot)lucas(at)gmail(dot)com" <drum(dot)lucas(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: pg_toast growth out - PostgreSQL 9.2
Date: 2016-03-16 23:32:29
Message-ID: CAKFQuwa+BXKB4ib=+WC0Cg8hHqkB8pWduz-nRFHRvn958M9Eew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Mar 16, 2016 at 3:47 PM, drum(dot)lucas(at)gmail(dot)com <drum(dot)lucas(at)gmail(dot)com>
wrote:

> Hi all,
>
> Trying to understand how can the pg_toast table be 90% of my entire DB?
>
It isn't "the", its "one of my". "One of my pg_toast" tables consumes 90%
of my entire DB". Though its remotely possible you only have one it is not
generally the case.

> SELECT nspname || '.' || relname AS "relation",
> pg_size_pretty(pg_relation_size(C.oid)) AS "size"
> FROM pg_class C
> LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
> WHERE nspname NOT IN ('pg_catalog', 'information_schema')
> ORDER BY pg_relation_size(C.oid) DESC
> LIMIT 20;
>
> *Results:*
>
> pg_toast.pg_toast_7255249 1581 GBpublic.ja_feedlog 81 GB
>
> *Total DB size: 1.7 TB*
>
> What's going on here?
>
​http://www.postgresql.org/docs/current/static/storage-toast.html​

> Is there anything I can do to save up some disk space?
>
Not outside of radical changes to your architecture or deleting records -
though possibly marginal improvements could be made dependent upon the type
of data that is being "toasted".

David J.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Nagy László Zsolt 2016-03-17 07:32:55 Re: How to setup a good collation?
Previous Message drum.lucas@gmail.com 2016-03-16 22:47:30 pg_toast growth out - PostgreSQL 9.2