Re: delete and pg_toast = shrink database?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Edwin UY <edwin(dot)uy(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: delete and pg_toast = shrink database?
Date: 2025-02-27 21:23:50
Message-ID: CAKFQuwZdRgAMW__2Ge99FmoMZ9GxYW4diCbu=-0sHUC7Ey3xiw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Feb 27, 2025 at 2:19 PM Edwin UY <edwin(dot)uy(at)gmail(dot)com> wrote:

> Hi,
>
> DB is currently 500G. About 75% of this is pg_toast.
> Had advised the application team to check for data purging as there are
> some very old data.
> Is it correct to assume that doing so should shrink the database size?
> I believe I have to run vacuum full/table at some stage to really shrink
> it?
>
>
Yes, most likely to reclaim the space to the OS you will need to use vacuum
full or equivalent.

David J.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ron Johnson 2025-02-27 23:29:06 Re: delete and pg_toast = shrink database?
Previous Message David G. Johnston 2025-02-27 21:21:41 Re: pg_toast doesn't show in pgAdmin 4 6.21