Re: Toast space grows - Mailing list pgsql-performance

From Tom Lane
Subject Re: Toast space grows
Date
Msg-id 13188.1204900283@sss.pgh.pa.us
Whole thread Raw
In response to Re: Toast space grows  ("Pavel Rotek" <pavel.rotek@gmail.com>)
List pgsql-performance
"Pavel Rotek" <pavel.rotek@gmail.com> writes:
> 2008/3/7, Tom Lane <tgl@sss.pgh.pa.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

pgsql-performance by date:

Previous
From: "Pavel Rotek"
Date:
Subject: Re: Toast space grows
Next
From: Bill Moran
Date:
Subject: Re: Toast space grows