Re: Autovacuum not vacuuming pg_largeobject - Mailing list pgsql-general

From Tom Lane
Subject Re: Autovacuum not vacuuming pg_largeobject
Date
Msg-id 1606.1188488273@sss.pgh.pa.us
Whole thread Raw
In response to Autovacuum not vacuuming pg_largeobject  (Denis Gasparin <denis@edistar.com>)
Responses Re: Autovacuum not vacuuming pg_largeobject  (Denis Gasparin <denis@edistar.com>)
List pgsql-general
Denis Gasparin <denis@edistar.com> writes:
> I'm a bit concerned about the autovacuum daemon.
> Today I runned a vacuum full during a normal maintainance task and I
> noticed that the size of pg_largeobject
> decreased from 14GB to 4GB...

> Every night we have a procedure that deletes large object no more
> referenced using the vacuumlo program.

> This program issues delete commands to the pg_largeobject table in order
> to erase the rows of the los no more referenced.

> Autovacuum is up and running... but now i'm thinking it doesn't examine
> system tables such as pg_largeobject...

> Am I wrong?

Yeah, you're wrong.  The difference is that plain vacuum does not try
very hard to reduce the length of a table file --- it just frees up
space within the file for reuse.  vacuum full will actually move things
from the end of the file to free space nearer the head of the file,
so that it can shorten the file.

What I suspect the above observations really prove is you don't have
max_fsm_pages set high enough, and so pg_largeobject was bloating because
the free space was being forgotten instead of reused.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump.... pg_restore...how long does it take?
Next
From: Tom Lane
Date:
Subject: Re: rules and rows affected