Re: Logical Replication - PG_Wall size is too big, What can I do ? - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Logical Replication - PG_Wall size is too big, What can I do ?
Date
Msg-id 8b77f9ece694ada85ea64c90d657f0ba4d515100.camel@cybertec.at
Whole thread Raw
In response to Logical Replication - PG_Wall size is too big, What can I do ?  (Jaurès FOUTE KUETE <jauresfoute@gmail.com>)
List pgsql-general
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



pgsql-general by date:

Previous
From: Jaurès FOUTE KUETE
Date:
Subject: Logical Replication - PG_Wall size is too big, What can I do ?
Next
From: Laurenz Albe
Date:
Subject: Re: SQL: Chaining versus Pipelining