Re: please explain vacuum with WAL - Mailing list pgsql-general

From Craig Ringer
Subject Re: please explain vacuum with WAL
Date
Msg-id 4873334A.30207@postnewspapers.com.au
Whole thread Raw
In response to Re: please explain vacuum with WAL  (Dmitry Melekhov <dm@belkam.com>)
List pgsql-general
Dmitry Melekhov wrote:
> Glyn Astill пишет:
>> WAL is the journal for postgres, so every event that happens goes into the WAL. Using it for backup or replication
simplyuses it to replay all events on the backup / replicated database. 

> As I thought, thank you.
> But why vacuum generates WAL ? As I understand all database changes are
> already logged....

Sure, but at a very low level. It's not logging statements and replaying
those statements; it's more of a block-level change log.

My understanding is that for later WAL records from the master server to
make sense to a slave that's replaying them, the changes made by VACUUM
must also be replicated. Otherwise the archived WAL segments from the
master will be asking the slave to do things that just don't make sense
given the slave's current understanding of the database state.

--
Craig Ringer

pgsql-general by date:

Previous
From: Dmitry Melekhov
Date:
Subject: Re: please explain vacuum with WAL
Next
From: "Dennis Brakhane"
Date:
Subject: Re: Query running slow but was running fine before