Re: PostgreSQL Limits and lack of documentation about them.

From: John Naylor <jcnaylor(at)gmail(dot)com>
To: "Nasby, Jim" <nasbyj(at)amazon(dot)com>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PostgreSQL Limits and lack of documentation about them.
Date: 2018-11-01 02:22:01
Message-ID: CAJVSVGVg-T3fkxhXK4VQdUSssodXBTa2J=ZsMSN7bD=RnY2azg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/1/18, Nasby, Jim <nasbyj(at)amazon(dot)com> wrote:
> Hmm… 18 bytes doesn’t sound right, at least not for the Datum. Offhand I’d
> expect it to be the small (1 byte) varlena header + an OID (4 bytes). Even
> then I don’t understand how 1600 text columns would work; the data area of a
> tuple should be limited to ~2000 bytes, and 2000/5 = 400.

The wording in the docs (under Physical Storage) is "Allowing for the
varlena header bytes, the total size of an on-disk TOAST pointer datum
is therefore 18 bytes regardless of the actual size of the represented
value.", and as I understand it, it's

header + toast table oid + chunk_id + logical size + compressed size.

This is one area where visual diagrams would be nice.

-John Naylor

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Steve Singer 2018-11-01 03:07:44 Re: heap_sync seems rather oblivious to partitioned tables (wal_level=minimal)
Previous Message David Rowley 2018-11-01 01:40:31 Re: Super PathKeys (Allowing sort order through precision loss functions)