Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 50EDD1337B92 for ; Tue, 5 Oct 2010 12:57:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 19806-03 for ; Tue, 5 Oct 2010 15:56:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from bay0-omc2-s9.bay0.hotmail.com (bay0-omc2-s9.bay0.hotmail.com [65.54.190.84]) by mail.postgresql.org (Postfix) with ESMTP id 999121337B89 for ; Tue, 5 Oct 2010 12:56:56 -0300 (ADT) Received: from BAY149-W44 ([65.54.190.125]) by bay0-omc2-s9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 5 Oct 2010 08:56:55 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_57950d6a-d7c0-467e-8dab-871767e500e1_" X-Originating-IP: [91.206.0.43] From: Kieren Scott To: , Subject: Re: vacuum full table - internals in 8.3 Date: Tue, 5 Oct 2010 15:56:55 +0000 Importance: Normal In-Reply-To: <4CAAFCDA0200002500036520@gw.wicourts.gov> References: , <4CAAFCDA0200002500036520@gw.wicourts.gov> MIME-Version: 1.0 X-OriginalArrivalTime: 05 Oct 2010 15:56:55.0705 (UTC) FILETIME=[EF481090:01CB64A5] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/40 X-Sequence-Number: 35781 --_57950d6a-d7c0-467e-8dab-871767e500e1_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks Kevin. That confirms what I've seen on 8.3. Could you explain what causes index bloat when running vacuum full? I've=20 read that index bloat can occur=2C but no quite sure what is going on inter= nally. Kieren > Date: Tue=2C 5 Oct 2010 10:24:26 -0500 > From: Kevin.Grittner@wicourts.gov > To: kierenscott@hotmail.com=3B pgsql-admin@postgresql.org > Subject: Re: [ADMIN] vacuum full table - internals in 8.3 >=20 > Kieren Scott wrote: > =20 > > I'm trying to understand what is going on internally when doing a > > VACUUM FULL on a table in 8.3. > >=20 > > I have a table that is 1GB in size=2C 500M is used=2C and 500M is free > > space. When I do a vacuum full on this table=2C will it either: - > >=20 > > 1) Compact all of the used tuples into free space within the > > existing disk file and then shrink the file to 500M. Therefore > > simply freeing up 500M in the disk file. > =20 > On 8.3=2C this is what it will do=2C although it can take a very long > time. I've given up on this before completion (sometimes after > leaving it cranking away for a couple days) every time I've tried it > on a table with more than a few GB and any significant bloat. I > don't know that I've ever tried it on a table as small as you > describe=2C but I would bet that CLUSTER is going to be much faster if > you have the half a GB free space. Another issue with VACUUM FULL > is that it bloats indexes=3B so you generally need to follow it with a > REINDEX on the table. > =20 > -Kevin >=20 > --=20 > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin = --_57950d6a-d7c0-467e-8dab-871767e500e1_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks Kevin. That confirms what I've seen on 8.3.

Could you explain= what causes index bloat when running vacuum full? I've
read that index= bloat can occur=2C but no quite sure what is going on internally.

K= ieren

>=3B Date: Tue=2C 5 Oct 2010 10:24:26 -0500
>=3B From: = Kevin.Grittner@wicourts.gov
>=3B To: kierenscott@hotmail.com=3B pgsql-= admin@postgresql.org
>=3B Subject: Re: [ADMIN] vacuum full table - int= ernals in 8.3
>=3B
>=3B Kieren Scott <=3Bkierenscott@hotmail.c= om>=3B wrote:
>=3B
>=3B >=3B I'm trying to understand what = is going on internally when doing a
>=3B >=3B VACUUM FULL on a table= in 8.3.
>=3B >=3B
>=3B >=3B I have a table that is 1GB in s= ize=2C 500M is used=2C and 500M is free
>=3B >=3B space. When I do = a vacuum full on this table=2C will it either: -
>=3B >=3B
>= =3B >=3B 1) Compact all of the used tuples into free space within the
= >=3B >=3B existing disk file and then shrink the file to 500M. Therefo= re
>=3B >=3B simply freeing up 500M in the disk file.
>=3B >=3B On 8.3=2C this is what it will do=2C although it can take a very lo= ng
>=3B time. I've given up on this before completion (sometimes afte= r
>=3B leaving it cranking away for a couple days) every time I've tri= ed it
>=3B on a table with more than a few GB and any significant bloa= t. I
>=3B don't know that I've ever tried it on a table as small as y= ou
>=3B describe=2C but I would bet that CLUSTER is going to be much f= aster if
>=3B you have the half a GB free space. Another issue with V= ACUUM FULL
>=3B is that it bloats indexes=3B so you generally need to = follow it with a
>=3B REINDEX on the table.
>=3B
>=3B -Kev= in
>=3B
>=3B --
>=3B Sent via pgsql-admin mailing list (pg= sql-admin@postgresql.org)
>=3B To make changes to your subscription:>=3B http://www.postgresql.org/mailpref/pgsql-admin
= --_57950d6a-d7c0-467e-8dab-871767e500e1_--