pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
curious vacuum full behavior
2+ messages / 2 participants
[nested] [flat]

* curious vacuum full behavior
@ 2021-02-04 10:03  Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
  0 siblings, 1 reply; 2+ messages in thread

From: Zwettler Markus (OIZ) @ 2021-02-04 10:03 UTC (permalink / raw)
  To: pgsql-general

I have 2 identical systems A + B.
B being a clone of A.


The table pg_catalog.pg_largeobject was identical on both systems: 300GB in total size; 100GB bloated.


I did following on A:

?  vacuum full pg_catalog.pg_largeobject;
(using the default maintenance_work_mem of 64MB)
It took around 45 minutes and increased the diskspace by around 125% until the vacuum had been finished.


I did following on B:

?  set maintenance_work_mem = '256MB';

?  vacuum full pg_catalog.pg_largeobject;
This took around 5 minutes. I don't know if the diskspace ever increased.


I was really surprised.
Is there any explanation on this behavior?
Is vacuum full heavily using on-disk sort areas if maintenance_work_mem is too low?


Postgres Version 9.6


Thanks, Markus

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: curious vacuum full behavior
@ 2021-02-04 11:42  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
  0 siblings, 0 replies; 2+ messages in thread

From: Laurenz Albe @ 2021-02-04 11:42 UTC (permalink / raw)
  To: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>; pgsql-general

On Thu, 2021-02-04 at 10:03 +0000, Zwettler Markus (OIZ) wrote:
> I have 2 identical systems A + B.
> B being a clone of A.
> 
> The table pg_catalog.pg_largeobject was identical on both systems: 300GB in total size; 100GB bloated.
> 
> I did following on A:
> ð  vacuum full pg_catalog.pg_largeobject;
> (using the default maintenance_work_mem of 64MB)
> It took around 45 minutes and increased the diskspace by around 125% until the vacuum had been finished.
> 
> I did following on B:
> ð  set maintenance_work_mem = '256MB';
> ð  vacuum full pg_catalog.pg_largeobject;
> This took around 5 minutes. I don't know if the diskspace ever increased.
> 
> I was really surprised.
> Is there any explanation on this behavior?
> Is vacuum full heavily using on-disk sort areas if maintenance_work_mem is too low?
> 
> Postgres Version 9.6

VACUUM (FULL) will re-create the indexes too, and "maintenance_work_mem"
has an impact on index build speed.
But I have no explanation for such a large difference.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-02-04 11:42 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 10:03 curious vacuum full behavior Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
2021-02-04 11:42 ` Laurenz Albe <laurenz.albe@cybertec.at>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox