Re: checkpoint occurs very often when vacuum full running - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: checkpoint occurs very often when vacuum full running
Date
Msg-id 77addc59000b6e152c44aad3b1b9f739e025973b.camel@cybertec.at
Whole thread Raw
In response to Re: checkpoint occurs very often when vacuum full running  (Mariel Cherkassky <mariel.cherkassky@gmail.com>)
Responses Re: checkpoint occurs very often when vacuum full running  (Mariel Cherkassky <mariel.cherkassky@gmail.com>)
List pgsql-admin
Mariel Cherkassky wrote:
> First of all thank you for the quick answer. In my case checkpoint happened
> every one second during the vacuum full so the checkpoint timeout isn't relevant.
> My guess was that it writes the changes to the wals but I didn't find anything
> about it in the documentation. Can you share a link that proves it ?
> I mean basicly the wals should contain the changes, and vacuum full changes
> the location of the data and not actually the data.

VACUUM (FULL) completely rewrites all the tables and indexes, so the complete
database will go into the WAL (these data changes have to be replayed in case
of a crash!). WAL contains the physical and not the logical changes, and the
physical data *are* modified.

You should let autovacuum do the job instead of running VACUUM (FULL), unless
your whole database is bloated beyond tolerance.  That will cause less WAL
activity and also won't disrupt normal database operation.

If you really need that VACUUM (FULL), you can increase "max_wal_size" to
get fewer checkpoints.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com



pgsql-admin by date:

Previous
From: Sergei Kornilov
Date:
Subject: Re: checkpoint occurs very often when vacuum full running
Next
From: Laurenz Albe
Date:
Subject: Re: The current shape of PG master-slave replication