From: Simon Riggs <simon@2ndQuadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: VACUUMs and WAL
Date: Tue, 28 Oct 2008 08:49:45 +0000
Message-ID: <1225183785.3971.114.camel@ebony.2ndQuadrant> (raw)
Looking at a VACUUM's WAL records makes me think twice about the way we
issue a VACUUM.
1. First we scan the heap, issuing a HEAP2 clean record for every block
that needs cleaning.
2. Then we scan the index, issuing WAL records as appropriate.
3. Then we rescan the heap, issuing a HEAP2 clean record for every
block.
I don't see a reason why we would issue 2 WAL records per block for a
VACUUM, nor why we would prune and remove in two steps, dirtying the
block each time. Seems like we could write approximately half the amount
of data that we do.
Surely we can come up with a better plan than that one?
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: simon@2ndQuadrant.com
Subject: Re: VACUUMs and WAL
In-Reply-To: <1225183785.3971.114.camel@ebony.2ndQuadrant>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox