From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Cc: | "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Possible documentation error |
Date: | 2006-12-26 17:23:52 |
Message-ID: | 20061226172352.GA75875@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 26, 2006 at 06:12:45PM +0100, Martijn van Oosterhout wrote:
> On Tue, Dec 26, 2006 at 12:04:40PM -0500, D'Arcy J.M. Cain wrote:
> > Now it certainly seems to me that it should behave as described given
> > the definition of VACUUM FULL so I am a little confused by my tests.
> > My test table only has two entries in it. Is that the issue? In fact,
> > I find the same behaviour if I do a simple VACUUM on the table.
>
> On a table with two entries, VACUUM FULL is going to do nothing of
> interest. Moving tuples within a page is useless, generally.
A test on a larger table shows the behavior:
test=> CREATE TABLE foo (x integer);
CREATE TABLE
test=> INSERT INTO foo SELECT * FROM generate_series(1, 1000);
INSERT 0 1000
test=> DELETE FROM foo WHERE x BETWEEN 2 AND 999;
DELETE 998
test=> SELECT ctid, x FROM foo;
ctid | x
--------+------
(0,1) | 1
(4,92) | 1000
(2 rows)
test=> VACUUM foo;
VACUUM
test=> SELECT ctid, x FROM foo;
ctid | x
--------+------
(0,1) | 1
(4,92) | 1000
(2 rows)
test=> VACUUM FULL foo;
VACUUM
test=> SELECT ctid, x FROM foo;
ctid | x
-------+------
(0,1) | 1
(0,2) | 1000
(2 rows)
--
Michael Fuhr
From | Date | Subject | |
---|---|---|---|
Next Message | D'Arcy J.M. Cain | 2006-12-26 17:49:55 | Re: Possible documentation error |
Previous Message | Martijn van Oosterhout | 2006-12-26 17:12:45 | Re: Possible documentation error |