Hi,

On Tue, Sep 15, 2026 at 1:31 AM Robert Haas <[email protected]> wrote:
>
> But it might be hard to
> tell the difference between a file that corresponds to nothing we saw
> in pg_class because it's orphaned and a file that corresponds to
> nothing we saw in pg_class because it was concurrently created and the
> pg_class entry isn't yet visible to us. And, in the latter case,
> skipping locking would probably be bad for all the same reasons it
> would be bad to do that in general. But if you can find some way to
> distinguish those cases reliably, then I think this might be a robust
> fix.

pg_orphaned ([1]) is using a dirty snapshot while looking for the
relfilnode(s) in
pg_class to distinguish those cases. Maybe we could do the same here?

[1]: https://github.com/bdrouvot/pg_orphaned

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com


Reply via email to