Shadar <shauldar@gmail.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