Hi guys,

Quick question about how column storage works.  If you set a TEXT field 
to be storage MAIN, does this place a limit on the amount of data that 
can be stored in the row (eg. 8k?)

Chris


Fri, 16 Jan 2004 10:12:20 +0800
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Using storage MAIN
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> Quick question about how column storage works.  If you set a TEXT field 
> to be storage MAIN, does this place a limit on the amount of data that 
> can be stored in the row (eg. 8k?)

No, because it will still be forced out-of-line if that's the only way
to make the row fit.  The source code comments may be helpful:

    /*----------
     * attstorage tells for VARLENA attributes, what the heap access
     * methods can do to it if a given tuple doesn't fit into a page.
     * Possible values are
     *        'p': Value must be stored plain always
     *        'e': Value can be stored in "secondary" relation (if relation
     *             has one, see pg_class.reltoastrelid)
     *        'm': Value can be stored compressed inline
     *        'x': Value can be stored compressed inline or in "secondary"
     * Note that 'm' fields can also be moved out to secondary storage,
     * but only as a last resort ('e' and 'x' fields are moved first).
     *----------
     */

You could force no-compression, no-out-of-line semantics by setting it
to PLAIN, and then it *would* fail if over 8K.

			regards, tom lane

Thu, 15 Jan 2004 21:32:30 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Using storage MAIN 