Re: Logical replication in PostgreSQL Amount of subscriber vs publisher WALs Vacuuming

From: PALAYRET Jacques <jacques(dot)palayret(at)meteo(dot)fr>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Logical replication in PostgreSQL Amount of subscriber vs publisher WALs Vacuuming
Date: 2026-03-25 16:15:20
Message-ID: 1748712738.372293199.1774455320476.JavaMail.zimbra@meteo.fr
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

Vacuuming seems to explain these differences.
Especially for large tables, vacuuming can generate many WAL.

Regards

De: "PALAYRET Jacques" <jacques(dot)palayret(at)meteo(dot)fr>
À: pgsql-general(at)lists(dot)postgresql(dot)org
Envoyé: Mardi 24 Mars 2026 15:06:23
Objet: Logical replication in PostgreSQL Amount of subscriber vs publisher WALs

Hello,

The amount of WAL generated by an SQL INSERT or UPDATE statement applied to a table with multiple indexes can be much greater than the size of the table (table + index).
For example, an INSERT statement in an empty table (with 3 indexes) can generate WALs twice the size of the table (table + index).
This difference (even for an INSERT) may seem surprising, but it's understandable.

What's less intuitive is that, according to my tests, with logical replication in PostgreSQL, the amount of WAL generated by an SQL statement can be very different between the subscriber server (the replica) and the publisher server (the provider).
Is this accurate? Sometimes 1.5 or 2 times greater?

Regards
----- Météo-France -----
PALAYRET Jacques
DCSC/GDC
jacques(dot)palayret(at)meteo(dot)fr
Fixe : +33 561078319

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Durumdara 2026-03-25 17:20:46 Where to store some session based info?
Previous Message Adrian Klaver 2026-03-25 14:35:21 Re: malformated LSB header in postgres: missing LSB end marker, aborting