From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Todd Gugler <tgugler11@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: Can autovacuum result in large surges in WAL files
Date: Tue, 03 May 2011 12:31:42 -0500
Message-ID: <4DBFF5AE020000250003D1D9@gw.wicourts.gov> (raw)
In-Reply-To: <CBFC2500-5ADB-48FD-AC3B-C450E02E9F6A@gmail.com>
References: <CBFC2500-5ADB-48FD-AC3B-C450E02E9F6A@gmail.com>
Todd Gugler <tgugler11@gmail.com> wrote:
> Should a vacuum analyze lead to large amounts of data being
> written to WAL files?
Yes, if it has to "freeze" the rows to prevent transaction
wraparound.
> We are seeing 10x the number WAL files that we would expect.
>
> Any ideas on the best approach to diagnose what is going on?
Is it vacuuming a table which was bulk loaded at some time in the
past? If so, this can happen any time later (usually during busy
periods when many transactions numbers are being assigned). To
prevent this in the future, run VACUUM FREEZE ANALYZE after any bulk
load.
There has been much talk about possible ways to avoid this behavior
by initially setting bulk loaded data to "frozen", but there are
technical problems which haven't been adequately addressed yet.
-Kevin
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-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, tgugler11@gmail.com
Subject: Re: Can autovacuum result in large surges in WAL files
In-Reply-To: <4DBFF5AE020000250003D1D9@gw.wicourts.gov>
* 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