Re: Observation with Postgres table size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


> On May 10, 2024, at 7:57 AM, Sabyasachi Mukherjee <mukherjee.sabyasachi@xxxxxxxxxxx> wrote:
> Can any body please advise, how to reduce the size of the table?


Read the docs to understand what it does. Deleting a row does not shrink the table. 

Think about it, what happens when you delete a row that's first in the file on disk? Do you expect the rest of the table to be rewritten? Do you expect the file to be rewritten every time a row is deleted? On commit of any transaction that included a delete?

Postgres will eventually reuse the space left behind by deleted rows (read the docs for VACUUM), so under most use cases this is not a problem.

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux