Unable to Vacuum Large Defragmented Table

From: Igal Sapir <igal(at)lucee(dot)org>
To: "Psql_General (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Unable to Vacuum Large Defragmented Table
Date: 2019-04-07 22:08:46
Message-ID: CA+zig0_tXScTtWuPutERW6L_XaTs+4BjvBFHgHMdKdXHURPCOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a table for which pg_relation_size() shows only 31MB, but
pg_total_relation_size() shows a whopping 84GB.

The database engine is running inside a Docker container, with the data
mounted as a volume from a partition on the host's file system.

When I try to run `VACUUM FULL`, the disk usage goes up until it reaches
the full capacity of the partition (about 27GB of free space), at which
point it fails.

How can I reclaim the disk space here other than write the data to a new
table and drop the old one?

Thank you,

Igal

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-04-08 00:10:05 Re: Unable to Vacuum Large Defragmented Table
Previous Message Sherrylyn Branchaw 2019-04-07 20:49:20 Re: pg_upgrade --jobs