Re: Server with hot standby slave wont start after vacuum - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Server with hot standby slave wont start after vacuum
Date
Msg-id edb18ce58cf65078d3a4aeb5300c383b2a0c0468.camel@cybertec.at
Whole thread Raw
In response to Server with hot standby slave wont start after vacuum  ("Andrus" <kobruleht2@hot.ee>)
List pgsql-general
On Mon, 2020-04-06 at 09:39 +0300, Andrus wrote:
> Streaming asynchronous binary replication is used with hot standby slave.
> 
> To recover disk space
> 
> vacuumdb --all --full --skip-locked
> 
> is executed in every night is master.
> 
> During this vacuumdb stops with error
> 
> vacuumdb: error: vacuuming of table "myschema.mytable" in database "mydb" failed: PANIC:  could not write to file 
> "pg_wal/xlogtemp.24729": No space left on device
> server closed the connection unexpectedly
>     This probably means the server terminated abnormally
>     before or while processing the request.
> 
> hot standby server is connected over 20 Mbit internet.
> 
> Maybe vacuum full causes creation of creates huge number files in pg_wal which cannot transferred fast over 20Mbit
internet.
> 
> How to fix this so that master continues to work?
> Mabe it is possible to disable creation of wal files by vacuum.
> 
> Postgres 12 in Debian is used.

Simple: don't run VACUUM (FULL).

Since that will rewrite the whole database, you should not be surprised
that it generates a lot of WAL.

Essentially, you are asking, "I have a cup that fits 20 ounces, now
I pour in a gallon, and it overflows.  How can I prevent that?"

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




pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: How to prevent master server crash if hot standby stops
Next
From: "Andrus"
Date:
Subject: Re: How to prevent master server crash if hot standby stops