diff options
author | Tom Lane | 2007-09-20 17:56:33 +0000 |
---|---|---|
committer | Tom Lane | 2007-09-20 17:56:33 +0000 |
commit | 282d2a03dd30804b01f8042f640d638c2ee76604 (patch) | |
tree | 004f08ce31f1bfb03ab55571ad7867babe5b3d7f /contrib/pgstattuple/pgstattuple.c | |
parent | bbf4fdc2538097bb3103806e1419ceef1f289203 (diff) |
HOT updates. When we update a tuple without changing any of its indexed
columns, and the new version can be stored on the same heap page, we no longer
generate extra index entries for the new version. Instead, index searches
follow the HOT-chain links to ensure they find the correct tuple version.
In addition, this patch introduces the ability to "prune" dead tuples on a
per-page basis, without having to do a complete VACUUM pass to recover space.
VACUUM is still needed to clean up dead index entries, however.
Pavan Deolasee, with help from a bunch of other people.
Diffstat (limited to 'contrib/pgstattuple/pgstattuple.c')
-rw-r--r-- | contrib/pgstattuple/pgstattuple.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/pgstattuple/pgstattuple.c b/contrib/pgstattuple/pgstattuple.c index 6e3271ea757..e3dae875932 100644 --- a/contrib/pgstattuple/pgstattuple.c +++ b/contrib/pgstattuple/pgstattuple.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/pgstattuple/pgstattuple.c,v 1.29 2007/09/12 22:10:25 tgl Exp $ + * $PostgreSQL: pgsql/contrib/pgstattuple/pgstattuple.c,v 1.30 2007/09/20 17:56:30 tgl Exp $ * * Copyright (c) 2001,2002 Tatsuo Ishii * @@ -290,7 +290,7 @@ pgstat_heap(Relation rel, FunctionCallInfo fcinfo) { buffer = ReadBuffer(rel, block); LockBuffer(buffer, BUFFER_LOCK_SHARE); - stat.free_space += PageGetFreeSpace((Page) BufferGetPage(buffer)); + stat.free_space += PageGetHeapFreeSpace((Page) BufferGetPage(buffer)); LockBuffer(buffer, BUFFER_LOCK_UNLOCK); ReleaseBuffer(buffer); block++; @@ -301,7 +301,7 @@ pgstat_heap(Relation rel, FunctionCallInfo fcinfo) while (block < nblocks) { buffer = ReadBuffer(rel, block); - stat.free_space += PageGetFreeSpace((Page) BufferGetPage(buffer)); + stat.free_space += PageGetHeapFreeSpace((Page) BufferGetPage(buffer)); ReleaseBuffer(buffer); block++; } |