Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 102E32E01F7 for ; Fri, 7 Mar 2008 10:28:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 78090-09 for ; Fri, 7 Mar 2008 10:28:00 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.239]) by postgresql.org (Postfix) with ESMTP id 3A0172E01D2 for ; Fri, 7 Mar 2008 10:28:00 -0400 (AST) Received: by wr-out-0506.google.com with SMTP id c49so136323wra.19 for ; Fri, 07 Mar 2008 06:27:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=44x9Bu9A+3VRaWboHDwIKi/q6oDB2D1KdnAL+kJwKKk=; b=j8bZfk/LSfRuXzMvewmKn0k7rNpK+JOsNgNG5E3vmL7IoMhsmADNBjgkMSB6lpHKPypglqXC4LqyY856JWWjD67tO0Jq23+a4yrlzBs8/2NbxnsxpqDuUSVlEpJ4x7Yfu8rIx2fSjXtoHIHWtt0ZcZUIh8YjoH+5sT8dKffSgB0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Ll1LF4jALK4a+LGqpUGtv097pJaUHZg9J0qW5VTkZia3YgV8PpXu2GV1NKOLfFSNKYiDB5KKkfIN7l19qOv49GwFXW24YCeq9SeWm3iYW1APrC1eyOGAd/SOAznd3a+5CvEwOmgrxZ1nw/8hPQZgwJDWGRqN05eTkUP6fh6nIm0= Received: by 10.65.151.17 with SMTP id d17mr1138285qbo.60.1204900067437; Fri, 07 Mar 2008 06:27:47 -0800 (PST) Received: by 10.64.3.7 with HTTP; Fri, 7 Mar 2008 06:27:47 -0800 (PST) Message-ID: <3556c08c0803070627w5a842140n9a0c9b574909849e@mail.gmail.com> Date: Fri, 7 Mar 2008 15:27:47 +0100 From: "Pavel Rotek" To: pgsql-performance@postgresql.org Subject: Re: Toast space grows In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_25895_27129647.1204900067392" References: <3556c08c0803070035p6d8b4aa8m6318f54728f61022@mail.gmail.com> <47D10722.4080508@archonet.com> <3556c08c0803070129y6ffabf32i1c8bae445ec460e0@mail.gmail.com> <20080307065314.1248665b.wmoran@collaborativefusion.com> <3556c08c0803070459i8598423t64e0704e48af533@mail.gmail.com> <11848.1204896799@sss.pgh.pa.us> <3556c08c0803070611p542eb317vfaf9b783172b6c3@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200803/164 X-Sequence-Number: 29118 ------=_Part_25895_27129647.1204900067392 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 2008/3/7, Matthew : > > On Fri, 7 Mar 2008, Pavel Rotek wrote: > > well, this will be the main problem... But... do uncomitted trasactions > > affect toast space? > > > I think the demonstrated answer to this is yes. > > > > (begin tx, load previous log, do business action, append new log, flush, > do > > business action, append new log, flush, ... do business action, append > new > > log, flush, commit tx). > > > If all you're doing is appending to the end of the log, why don't you make > each "append" a new row in a table. Instead of building massive rows, use > the database for what it was designed for, and have many smaller > independent rows. > > Matthew Because I modify existing application, where logic is already given :-(. If no other way exists, i'll have to do refactoring... -- > "To err is human; to really louse things up requires root > privileges." -- Alexander Pope, slightly paraphrased > ------=_Part_25895_27129647.1204900067392 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

2008/3/7, Matthew <matthew@flymine.org>:
On Fri, 7 Mar 2008, Pavel Rotek wrote:
> well, this will be the main problem... But... do uncomitted trasactions
> affect toast space?


I think the demonstrated answer to this is yes.


> (begin tx, load previous log, do business action, append new log, flush, do
> business action, append new log, flush, ... do business action, append new
> log, flush, commit tx).


If all you're doing is appending to the end of the log, why don't you make
each "append" a new row in a table. Instead of building massive rows, use
the database for what it was designed for, and have many smaller
independent rows.

Matthew

Because I modify existing application, where logic is already given :-(. If no other way exists, i'll have to do refactoring...

--
"To err is human; to really louse things up requires root
  privileges."                 -- Alexander Pope, slightly paraphrased

------=_Part_25895_27129647.1204900067392--