Re: Modifying TOAST_TUPLE_THRESHOLD and TOAST_TUPLE_TARGET?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Shadar" <shauldar(at)gmail(dot)com>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Modifying TOAST_TUPLE_THRESHOLD and TOAST_TUPLE_TARGET?
Date: 2009-06-12 15:24:26
Message-ID: 4A322CDA0200002500027A03@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Shadar <shauldar(at)gmail(dot)com> wrote:

>>> There have been several suggestions already.
>
> Yes, but other have commented that these (e.g. dropping TOAST table)
> might not work and even lose data, so I was left confused as to what
> would work...

Well, dropping the TOAST table once you have data in it will lose
data. The main problem with the techniques which don't involve
modifying the source code are that you can't force the column to be
stored in-line without getting an error on an attempt to store a value
which makes the row too big to fit on a single page.

> Again: do I have a choice? I'd rather not touch the code.

You've got lots of choices. For starters, I'm not at all sure you
will even have a performance benefit from inlining the data. You
could choose to just let PostgreSQL work the way most people do. A
couple options have been mentioned if you are sure your rows will
always fit on one page. None of these involve touching the source
code.

I threw together the patch to give you another option. Touching the
code isn't so scary once you get the hang of building from source.
Obviously you want test carefully before putting custom code into
production.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2009-06-12 15:47:58 Re: machine-readable explain output
Previous Message Albe Laurenz 2009-06-12 14:59:14 Re: Problem with listen_addresses = '*' on 8.4beta2 on AIX