I looked into this a bit more. I confirmed that in addition to the Text
type, the XML type also compresses large files. With a 2MB XML file, I get
the following results:
Storage Toast Table size
EXTERNAL 2392 KB
EXTENDED 312 KB
However, I withdraw the earlier speculation about when the issue occurs. It
clearly stops compressing files that are 'too large', but I'm not certain
what the trigger is. It may be related to the PGLZ_Strategy struct, which
contains a max_input_size value, or to some other factor.
Best regards,
larrry