Andrew McMillan <andrew@catalyst.net.nz> writes:
> In 7.0.3 you can use LZTEXT which gives good compression for most
> strings, managing to fit 50k in with that should be no problem if it is
> english (or other) language text. I've successfully stuffed over 200k
> into an LZTEXT field if it is especially compressible.
That seems overly optimistic to me, I'd not expect LZTEXT to give more
than about a factor of 2 compression on average.
> In 7.1 the limit is increased through arcane magic to (I think) around
> 2GB, possibly more, if you can make assumptions like "it won't be
> indexed". Even in 7.0.3 you can only index fields up to blocksize/3.
Just for the record, the hard upper limit on field size in 7.1 is 1GB
(in practice you probably don't want to go past a few megabytes).
As Andrew says, if the data is to be indexed then it's less, since btree
still has a one-third-page record-size limit. However that limit is
after LZ compression, so in practice you could index fields with widths
ranging up to perhaps 2/3 blocksize --- say 20K if you set BLCKSZ = 32K.
regards, tom lane