public inbox for [email protected]
help / color / mirror / Atom feedFrom: Laurenz Albe <[email protected]>
To: Jaurès FOUTE KUETE <[email protected]>
To: PostgreSQL General <[email protected]>
Subject: Re: Logical Replication - PG_Wall size is too big, What can I do ?
Date: Tue, 09 Jul 2024 09:42:51 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAHQ1jfe1tvh5M19KOEW0NRW5TQ30v9J5dQOV3DK=Zgv+4UsXNA@mail.gmail.com>
References: <CAHQ1jfe1tvh5M19KOEW0NRW5TQ30v9J5dQOV3DK=Zgv+4UsXNA@mail.gmail.com>
On Tue, 2024-07-09 at 07:05 +0100, Jaurès FOUTE KUETE wrote:
> [image showing a large "pg_wal" directory]
>
> We are facing this issue and want to know how can I do to clean this folder without problem.
>
> What can be the cause of that ?
> and How can I clean this folder without stopping Logical Replication ?
The cause is logical replication (probably the initial synchronization of
the tables), and the only way to clean that directory is to abort logical
replication.
PostgreSQL has to retain all WAL (transaction log) until copying the data
is done and it can actually start decoding.
One way to reduce the impact is to add tables to the publication one
after the other (and refreshing the publication each time). Copying the
data for a single table can finish faster, and logical replication can
start catching up sooner, so PostgreSQL doesn't have to keep so much WAL.
Yours,
Laurenz Albe
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Logical Replication - PG_Wall size is too big, What can I do ?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox