Re: Observation with Postgres table size

From: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
To: Sunil Jadhav <sunilbjpatil(at)gmail(dot)com>
Cc: Sabyasachi Mukherjee <mukherjee(dot)sabyasachi(at)outlook(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Observation with Postgres table size
Date: 2024-05-10 16:20:28
Message-ID: CAOC+FBUAsRSqUfS8DnQE_QvtaedqUcvyxh=cokSSgNaJzSb6QQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

pg_repack is another solution to rebuild the table (and reclaim space)
without the locks of VACUUM FULL, it's quite effective and easy.

On Fri, May 10, 2024 at 7:08 AM Sunil Jadhav <sunilbjpatil(at)gmail(dot)com> wrote:

> Hi Dear,
>
>
> Please carefully read the vacuum full documents if you try this this will
> impacts on current transaction due to exclusive lock if this is production
> db then you required a download time for that .
>
> Thanks
> Sunil
>
> On Fri, 10 May, 2024, 7:27 pm Sabyasachi Mukherjee, <
> mukherjee(dot)sabyasachi(at)outlook(dot)com> wrote:
>
>> Hello All,
>>
>> I am having an issue with the size of a Postgres DB table.
>> The table have 17 columns. Out of them 5 jsonb columns. The table had
>> 470000 rows when I checked from DBBeaver it showed the table size 34GB.
>> After I deleted many rows from the table - it has currently 27038 rows. But
>> the size of the table still shows 34GB.
>> I was expecting the size of the DB table to be reduced.
>> I event restarted the PG DB server service.
>> I am using Postgres v16 .
>> Can any body please advise, how to reduce the size of the table?
>>
>> Sabyasachi Mukherjee
>>
>

--
Wells Oliver
wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ron Johnson 2024-05-10 17:45:37 Re: cloudNativePg bootstrap from dump
Previous Message Scott Ribe 2024-05-10 16:19:28 Re: cloudNativePg bootstrap from dump