Re: TOAST and TEXT

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Rod Taylor <rbt(at)barchord(dot)com>
Cc: Chris Bitmead <chris(at)bitmead(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: TOAST and TEXT
Date: 2001-10-10 12:52:54
Message-ID: 200110101252.f9ACqsU01425@saturn.jw.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Rod Taylor wrote:
> It should be noted that there is still a limit of about 1GB if I
> remember correctly.

You're right, there is still a practical limit on the size of
a text field. And it's usually much lower than 1GB.

The problem is that first, the (encoded) data has to be put
completely into the querystring, passed to the backend and
buffered there entirely in memory. Then it get's parsed, and
the data copied into a const node. After rewriting and
planning, a heap tuple is build, containing the third,
eventually fourth in memory copy of the data. After that, the
toaster kicks in, allocates another chunk of that size to try
to compress the data and finally slices it up for storage.

So the limit depends on how much swapspace you have and where
the per process virtual memory limit of your OS is.

In practice, sizes of up to 10 MB are no problem. So storing
typical MP3s works.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2001-10-10 13:05:24 Re: Daily snapshots hosed (was Re: [pgadmin-hackers] What
Previous Message Haller Christoph 2001-10-10 11:37:51 Re: Connections, table locks, disk space