Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 4B289643CC2 for ; Mon, 15 Mar 2010 13:56:16 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 76147-01-4 for ; Mon, 15 Mar 2010 16:56:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f68.google.com (mail-pw0-f68.google.com [209.85.160.68]) by mail.postgresql.org (Postfix) with ESMTP id 6EFCF65AFC3 for ; Mon, 15 Mar 2010 13:37:58 -0300 (ADT) Received: by pwi1 with SMTP id 1so115521pwi.7 for ; Mon, 15 Mar 2010 09:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=qC5UiibuWn8sIDHAUg/RLLHWkKzSfOqJ710QIIE+1mc=; b=xhFR+v4NQhLc3Ntg0/qaDuK1iFSBJwuQkzr44/j/ZHxJf8LG4ObHwau1/MDDtWqmBT o6syI97uxHRTbtHhE1Cuts4nAfD3axTQXFXsw3eZSXlM2ZXxHzgUVB6bfPGW6QgJFYRD QyJMdKlIz7r9vq86wCb3CmAphYEwSf5gU//+E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=X+1J2l+8vzcPk0QP1pSsOikWcBqby9po1oU8BbzRsbnV+jEJizPOlXXDhwjtatDDXe d1drjHLsnxcRIx7yOIQQjl1pilJ6L7LvMfmrI/QAwUA3QwUTRHbtSDjeJRlZcthwhZsV e8T8H7yOuKpsm+4krEGJgWX0Yn2QxeVzG115Y= MIME-Version: 1.0 Received: by 10.142.55.17 with SMTP id d17mr5539527wfa.246.1268671077333; Mon, 15 Mar 2010 09:37:57 -0700 (PDT) In-Reply-To: <17919.1268664802@sss.pgh.pa.us> References: <20100313211742.GC2178@comppasch2> <600ad6df1003141822u297522dbvf1f7187d0eee803@mail.gmail.com> <600ad6df1003150654if287c53k301f5763e95a3540@mail.gmail.com> <4B9E4762.7060703@2ndquadrant.com> <17919.1268664802@sss.pgh.pa.us> Date: Mon, 15 Mar 2010 12:37:57 -0400 Message-ID: <600ad6df1003150937t68b6c1d4k976fb5504e448f3c@mail.gmail.com> Subject: Re: Deleting bytea, autovacuum, and 8.2/8.4 differences From: VJK To: Tom Lane , pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary=001636b2befde6bcf90481d980e1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201003/150 X-Sequence-Number: 37975 --001636b2befde6bcf90481d980e1 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Mar 15, 2010 at 10:53 AM, Tom Lane wrote: > Greg Smith writes: > > VJK wrote: > >> Since Pg does not use the concept of rollback segments, it is unclear > >> why deletion produces so much disk IO (4GB). > > For an example like this one, you have to keep in mind that the > toast-table rows for the large bytea value have to be marked deleted, > too. Also, since I/O happens in units of pages, the I/O volume to > delete a tuple is just as much as the I/O to create it. > That makes sense. > regards, tom lane > --001636b2befde6bcf90481d980e1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Mon, Mar 15, 2010 at 10:53 AM, Tom La= ne <tgl@sss.pgh.p= a.us> wrote:
Greg Smith <gr= eg@2ndquadrant.com> writes:
> VJK wrote:
>> Since Pg does not use the concept of rollback segments, =A0it is u= nclear
>> why deletion produces so much disk IO (4GB).

For an example like this one, you have to keep in mind that the
toast-table rows for the large bytea value have to be marked deleted,
too. =A0Also, since I/O happens in units of pages, the I/O volume to
delete a tuple is just as much as the I/O to create it.

That makes sense.
=A0
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0regards, tom lane

--001636b2befde6bcf90481d980e1--