From: Nathan Bossart <nathandbossart@gmail.com>
To: Sami Imseih <samimseih@gmail.com>
Cc: Shawn McCoy <shawn.the.mccoy@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Vacuumlo improvements
Date: Fri, 15 May 2026 15:29:39 -0500
Message-ID: <ageCM0exH2mKeZBT@nathan> (raw)
In-Reply-To: <CAA5RZ0sF_p-ZE6LdVgzPr=9C32i2p1Pu7uxAPCV22-qh4tFh_Q@mail.gmail.com>
References: <CALsgZNAM=AYK-9ZLR7Z0YLx6Lyx5aSrjjse3T+FmsJ=jTvfhDQ@mail.gmail.com>
<agPpPyLs-61qFw88@nathan>
<agU9JPim3XNwRJ4b@nathan>
<CAA5RZ0sF_p-ZE6LdVgzPr=9C32i2p1Pu7uxAPCV22-qh4tFh_Q@mail.gmail.com>
On Fri, May 15, 2026 at 02:36:22PM -0500, Sami Imseih wrote:
> I think there is value in expanding the vacuumlo search capability for
> LOs and OIDs. We can also detect LOs and OIDs stored in composite types,
> or OID[] and LO[]. All these are detectable from the catalog.
>
> The one complexity will be we will need vacuumlo to generate more complex
> expressions for deleting the data.
>
> DELETE FROM t WHERE lo IN (SELECT ("data")."lo_ref" FROM t_lo);
>
> But, this will be more comprehensive and can cover all potential ways
> an OID or LO can be used.
>
> What do you think?
It seems worth exploring.
> But with all this done, I am not sure how much this moves the needle. It may
> somewhat, but it's hard to tell how much. I know I have seen users store
> LO references in text or other types, so I think we still need the
> documentation enhancement to call out the "data loss" potential.
>
> I also think it will be good for the LO documentation [1] to nudge the users
> to think about using the LO extension, as is done with the vacuumlo [2]
> documentation.
Yeah, I think we'll have to do some combination of 1) improving vacuumlo,
2) improving the documentation to warn users about things vacuumlo doesn't
catch, and 3) improving the documentation to nudge users toward the lo
extension..
--
nathan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, samimseih@gmail.com, shawn.the.mccoy@gmail.com
Subject: Re: Vacuumlo improvements
In-Reply-To: <ageCM0exH2mKeZBT@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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