I've not found an equivalent of the about PostgreSQL page that covers the limitations of the large object facility in particular, but reading between the lines I think the following is true:
- No more than 32TB of large objects can be stored (reason: they are all stored in a single table named
pg_largeobject
, and the per-table size limit is 32TB (assuming default page size)). - No more than 2^32 large objects can be stored (reason: the primary key of
pg_largeobject
is anoid
which is a 32-bit quantity). pg_largeobject
cannot be partitioned (reason: because it's a system catalog?)
Is this all correct?
Best Answer
These 3 points are correct. We might add
Also, the binary contents are sliced into tiny chunks of 2000 bytes in
pg_largeobject
. There is one row per chunk, so when importing large contents (large by today's standards), the number of rows in this table tend to grow quickly. Although that does not imply a hard limit, users should be aware of that for performance reasons.