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