Re: Observation with Postgres table size

Поиск
Список
Период
Сортировка
От Scott Ribe
Тема Re: Observation with Postgres table size
Дата
Msg-id A261A0D0-9868-4096-8F64-C966C8DB129C@elevated-dev.com
обсуждение исходный текст
Ответ на Observation with Postgres table size  (Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>)
Список pgsql-admin
> On May 10, 2024, at 7:57 AM, Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com> wrote:
>
> Can any body please advise, how to reduce the size of the table?

VACUUM FULL

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
tableto be rewritten? Do you expect the file to be rewritten every time a row is deleted? On commit of any transaction
thatincluded a delete? 

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


В списке pgsql-admin по дате отправления:

Предыдущее
От: Sabyasachi Mukherjee
Дата:
Сообщение: Observation with Postgres table size
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Observation with Postgres table size