Re: vacuumlo - Mailing list pgsql-admin

From Julien Rouhaud
Subject Re: vacuumlo
Date
Msg-id CAOBaU_YNAsTVHXS1UFw_XBt2YOZjwsJ3KMnZXrwqKb+86WAhpg@mail.gmail.com
Whole thread Raw
In response to vacuumlo  (Ian Dauncey <Ian.Dauncey@bankzero.co.za>)
Responses RE: vacuumlo  (Ian Dauncey <Ian.Dauncey@bankzero.co.za>)
List pgsql-admin
Hi,

On Tue, Aug 17, 2021 at 7:52 PM Ian Dauncey <Ian.Dauncey@bankzero.co.za> wrote:
>
> I need to run the vacuumlo command against our production database.
>
> Being a PostgresQL database utility, it should be 100% safe to run and should not delete/drop active data.

It's safe as long as you're aware of what this tool is doing.  As
mentioned in https://www.postgresql.org/docs/current/vacuumlo.html:

> vacuumlo is a simple utility program that will remove any “orphaned” large objects from a PostgreSQL database. An
orphanedlarge object (LO) is considered to be any LO whose OID does not appear in any oid or lo data column of the
database.

So:

> I have run it in our QA environment with success, but now they are having a few application issues and I have told
themthat the issues cannot be related to the vacuumlo utility as it is a PostgresQL utility. 

The most likely explanation is that your database somehow has large
object that are not referenced in an "oid" or "lo" column.  If that's
the case, vacuumlo will delete some of your data, as you didn't you
your part of the contract required to use that tool, which is to
properly reference large objects reference.



pgsql-admin by date:

Previous
From: Ian Dauncey
Date:
Subject: vacuumlo
Next
From: Ron
Date:
Subject: Re: Join for the parent table will not leverage the index scan