On 11/1/18, Andrew Gierth <and...@tao11.riddles.org.uk> wrote: > So (with 8k blocks) the limit on the number of non-null external-toasted > columns is about 450, while you can have the full 1600 columns if they > are integers or smaller, or just over 1015 bigints. But you can have > 1600 text columns if they average 4 bytes or less (excluding length > byte). > > If you push too close to the limit, it may even be possible to overflow > the tuple size by setting fields to null, since the null bitmap is only > present if at least one field is null. So you can have 1010 non-null > bigints, but if you try and do 1009 non-null bigints and one null, it > won't fit (and nor will 999 non-nulls and 11 nulls, if I calculated > right).
Thanks for that, Andrew, that was insightful. I drilled down to get the exact values: Non-nullable columns: text (4 bytes each or less): 1600 toasted text: 452 int: 1600 bigint: 1017 Nullable columns with one null value: text (4 bytes each or less): 1600 toasted text: 449 int: 1600 bigint: 1002 -John Naylor