Re: Options for more aggressive space reclamation in vacuuming?

Поиск
Список
Период
Сортировка
Искать
От
Laurenz Albe
Тема
Re: Options for more aggressive space reclamation in vacuuming?
Дата
в 07:56:16
Msg-id
70d586af88aa7365670cd75a826784554c5ce816.camel@cybertec.at
Ответ на
Список
Дерево обсуждения
Options for more aggressive space reclamation in vacuuming? Wells Oliver <wells.oliver@gmail.com>
Re: Options for more aggressive space reclamation in vacuuming? Ron <ronljohnsonjr@gmail.com>
Re: Options for more aggressive space reclamation in vacuuming? Jeff Janes <jeff.janes@gmail.com>
Re: Options for more aggressive space reclamation in vacuuming? Wells Oliver <wells.oliver@gmail.com>
Re: Options for more aggressive space reclamation in vacuuming? Paul Smith <paul@pscs.co.uk>
Re: Options for more aggressive space reclamation in vacuuming? Wells Oliver <wells.oliver@gmail.com>
Re: Options for more aggressive space reclamation in vacuuming? Paul Smith <paul@pscs.co.uk>
Re: Options for more aggressive space reclamation in vacuuming? Laurenz Albe <laurenz.albe@cybertec.at>
Re: Options for more aggressive space reclamation in vacuuming? Ron <ronljohnsonjr@gmail.com>
Re: Options for more aggressive space reclamation in vacuuming? Wells Oliver <wells.oliver@gmail.com>
Re: Options for more aggressive space reclamation in vacuuming? Ron <ronljohnsonjr@gmail.com>
Re: Options for more aggressive space reclamation in vacuuming? Peter Geoghegan <pg@bowt.ie>
Re: Options for more aggressive space reclamation in vacuuming? Jeff Janes <jeff.janes@gmail.com>
Re: Options for more aggressive space reclamation in vacuuming? Wolfgang Wilhelm <wolfgang20121964@yahoo.de>
Re: Options for more aggressive space reclamation in vacuuming? Wells Oliver <wells.oliver@gmail.com>
Re: Options for more aggressive space reclamation in vacuuming? Wolfgang Wilhelm <wolfgang20121964@yahoo.de>
Re: Options for more aggressive space reclamation in vacuuming? Ron <ronljohnsonjr@gmail.com>
Re: Options for more aggressive space reclamation in vacuuming? Wells Oliver <wells.oliver@gmail.com>
On Sun, 2023-05-14 at 14:02 -0700, Wells Oliver wrote:
> I think our use-case here is nothing special: just very large tables that are deleted
> from and re-inserted with some frequency. They store monthly data and exist as partitions.
> As an example, July of 2022 (summer months are peak) had 1,630,558,336 rows. We delete
> from this and insert daily. We rarely get new, relevant data once the month is over.
> The n_dead_tup from pg_stat_all_tables here was over 7m rows, and clearing that out
> gave us back nearly 50GB, and the file size estimate on this partition was ~200 GB.
> These tables get auto-vacuumed but clearly it's not, well, aggressively reclaiming space.

As a rule, normal VACUUM will not reclaim space at all (only if after the run, the last
pages of a tabel are empty).  That's why you use range partitioning.  Simply drop the
partition that is expired.  Ideally, you wouldn't go to the trouble of deleting data at all.

Yours,
Laurenz Albe


В списке pgsql-admin по дате отправления
От: Ron
Дата:
От: Alvaro Herrera
Дата:
FAQ