pg_largeobject — PostgreSQL system catalog

The PostgreSQL pg_largeobject system catalog: full column reference (names, types, descriptions), catalog relationships and version support.

Summary

The catalog pg_largeobject holds the data making up “large objects”. A large object is identified by an OID assigned when it is created. Each large object is broken into segments or “pages” small enough to be conveniently stored as rows in pg_largeobject. The amount of data per page is defined to be LOBLKSIZE (which is currently BLCKSZ/4, or typically 2 kB).

(Description quoted from the official PostgreSQL documentation.)

Columns

The pg_largeobject system catalog exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):

  • loid oid references pg_largeobject_metadata.oid
    Identifier of the large object that includes this page
  • pageno int4
    Page number of this page within its large object (counting from zero)
  • data bytea
    Actual data stored in the large object. This will never be more than LOBLKSIZE bytes and might be less.

Related catalogs

This object references the following other system catalogs:

Version applicability

Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.

Related & references

Reference: PostgreSQL documentation — pg_largeobject.