Skip site navigation (1) Skip section navigation (2)

pgsql: Introduce visibility map.

From: heikki(at)postgresql(dot)org (Heikki Linnakangas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Introduce visibility map.
Date: 2008-12-03 13:05:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Log Message:
Introduce visibility map. The visibility map is a bitmap with one bit per
heap page, where a set bit indicates that all tuples on the page are
visible to all transactions, and the page therefore doesn't need
vacuuming. It is stored in a new relation fork.

Lazy vacuum uses the visibility map to skip pages that don't need
vacuuming. Vacuum is also responsible for setting the bits in the map.
In the future, this can hopefully be used to implement index-only-scans,
but we can't currently guarantee that the visibility map is always 100%

In addition to the visibility map, there's a new PD_ALL_VISIBLE flag on
each heap page, also indicating that all tuples on the page are visible to
all transactions. It's important that this flag is kept up-to-date. It
is also used to skip visibility tests in sequential scans, which gives a
small performance gain on seqscans.

Modified Files:
        Makefile (r1.18 -> r1.19)
        heapam.c (r1.270 -> r1.271)
        xlogutils.c (r1.64 -> r1.65)
        catalog.c (r1.79 -> r1.80)
        storage.c (r1.1 -> r1.2)
        vacuum.c (r1.381 -> r1.382)
        vacuumlazy.c (r1.111 -> r1.112)
        relcache.c (r1.277 -> r1.278)
        htup.h (r1.104 -> r1.105)
        bufpage.h (r1.84 -> r1.85)
        relfilenode.h (r1.20 -> r1.21)
        rel.h (r1.109 -> r1.110)

Added Files:
        visibilitymap.c (r1.1)
        visibilitymap.h (r1.1)

pgsql-committers by date

Next:From: Heikki LinnakangasDate: 2008-12-03 13:28:53
Subject: pgsql: Forgot to bump catalog version in the visibility map patch.
Previous:From: Peter EisentrautDate: 2008-12-03 12:39:57
Subject: pgsql: Update key words table to 8.4 and SQL:2008.

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group