From: | Keith Fiske <keith(dot)fiske(at)crunchydata(dot)com> |
---|---|
To: | srijith s <udbdoctor(at)gmail(dot)com> |
Cc: | Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: After vacuum db size is increasing |
Date: | 2021-08-16 21:40:09 |
Message-ID: | CAODZiv6N_j3X_0OyGnCiShJMgHuSCMf1aff3TYu7VkhyVwx79g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Mon, Aug 16, 2021 at 12:20 PM srijith s <udbdoctor(at)gmail(dot)com> wrote:
> Hi Postgres Admins
>
> Any help is much appreciated . When i am running vacuum full, the database
> size is getting increased a lot, my database was around 100gb and when i
> did vacuum full on the large table ( which consume 95% of data in the
> database) , database size become 200+ gb , then i did a full vacuum on the
> database itself and that made the db grow to 300+gb 🙄 and filled my data
> drive .
> The large table size is showing only 80gb.
>
> I am running Postgres on windows. Anybody know why its behaving like this
>
> Thanks in advance
> Regards
> Sri
>
>
>
>
>
> Sent from my iPhone
>
>
Running a VACUUM FULL is essentially rewriting the entire table. While it
is running, it is making a secondary copy of the object given. Doing this
on a single table could use up to double the size of the existing table
while it is running. It is also generating WAL files in addition to this
which will take up even more space.
After it completes, then and only then, will you get your space back. And
it will all depend on how much space was actually bloat to begin with.
It is recommended to keep an eye on your database's disk space and never
let it grow above 75% usage for these very sorts of situations. Often to
reclaim space in PostgreSQL you must use additional space to reclaim it
back.
--
Keith Fiske
Senior Database Engineer
Crunchy Data - http://crunchydata.com
From | Date | Subject | |
---|---|---|---|
Next Message | Shrikant Bhende | 2021-08-17 03:25:33 | Re: Join for the parent table will not leverage the index scan |
Previous Message | Peter M. Groen | 2021-08-16 18:50:58 | Re: After vacuum db size is increasing |