Re: Toast space grows

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pavel Rotek" <pavel(dot)rotek(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Toast space grows
Date: 2008-03-07 14:31:23
Message-ID: 13188.1204900283@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Pavel Rotek" <pavel(dot)rotek(at)gmail(dot)com> writes:
> 2008/3/7, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> You mean that you build up the 5MB log entry by adding a few lines at a
>> time? That's going to consume horrid amounts of toast space, because
>> each time you add a few lines, an entire new toasted field value is
>> created.

> well, this will be the main problem... But... do uncomitted trasactions
> affect toast space?

Sure. Where do you think the data goes? It's gotta be stored
someplace. Every UPDATE operation that changes a toasted field will
consume space for a fresh copy of that field, whether it ever commits or
not. You need VACUUM to reclaim the space eaten by no-longer-accessible
copies.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Bill Moran 2008-03-07 14:34:53 Re: Toast space grows
Previous Message Pavel Rotek 2008-03-07 14:27:47 Re: Toast space grows