Introduction of a new field in pg_class indicating presence of a large object in a table - Mailing list pgsql-general

From Gaurav Pant
Subject Introduction of a new field in pg_class indicating presence of a large object in a table
Date
Msg-id CAG53p5L7=K7qOCneELDCyLQ4oZcd3d8EWhrEHpzav-zHNM+RZg@mail.gmail.com
Whole thread Raw
Responses Re: Introduction of a new field in pg_class indicating presence of a large object in a table  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
Hi All,

I hope you're all doing well!

Recently, I have across a scenario where one of our client was unable to perform a major version upgrade of their PostgreSQL instance as it was failing due to OOM errors. When reviewed the upgrade log files and queried pg_largeobject_metadata, we found a significant number of large objects (more than a million) due to which the upgrade seems to fail. As the client had a different vendor in the past, they are unsure of why large objects were created in the first place. However, in order to further dive deep, the requirement is to identify the tables (and the columns) which contain these large objects to decide on the next steps. I checked for online resources but could not find any information that helps in this regard. 

Although quite different from the above specified use case, pg_class does contain a field: 'reltoastrelid' that helps us to identify the presence of a toast table for any relation in PostgreSQL. I wanted to know if there is any such system table that we can use to identify and map the fields containing large objects and the respective tables and if it is not already there, do we have any plans to incorporate the same in pg_class like we have for pg_toast?

Thanks and Regards,
Gaurav Pant

pgsql-general by date:

Previous
From: Dimitris Zenios
Date:
Subject: Re: pg_notify contention
Next
From: "David G. Johnston"
Date:
Subject: Re: Introduction of a new field in pg_class indicating presence of a large object in a table