public inbox for [email protected]  
help / color / mirror / Atom feed
From: Gaurav Pant <[email protected]>
To: [email protected]
Cc: Gaurav Pant <[email protected]>
Subject: Introduction of a new field in pg_class indicating presence of a large object in a table
Date: Wed, 1 May 2024 00:26:41 +0530
Message-ID: <CAG53p5L7=K7qOCneELDCyLQ4oZcd3d8EWhrEHpzav-zHNM+RZg@mail.gmail.com> (raw)

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


reply

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Introduction of a new field in pg_class indicating presence of a large object in a table
  In-Reply-To: <CAG53p5L7=K7qOCneELDCyLQ4oZcd3d8EWhrEHpzav-zHNM+RZg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox