Re: Server with hot standby slave wont start after vacuum

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Andrus <kobruleht2(at)hot(dot)ee>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Server with hot standby slave wont start after vacuum
Date: 2020-04-06 08:33:14
Message-ID: edb18ce58cf65078d3a4aeb5300c383b2a0c0468.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrus 2020-04-06 08:47:47 Re: How to prevent master server crash if hot standby stops
Previous Message Michael Paquier 2020-04-06 08:28:41 Re: How to prevent master server crash if hot standby stops