Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w5QtF-003FKF-0I for pgsql-general@arkaria.postgresql.org; Wed, 25 Mar 2026 16:15:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5QtD-00F2Zv-1r for pgsql-general@arkaria.postgresql.org; Wed, 25 Mar 2026 16:15:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w5QtD-00F2Zg-0l for pgsql-general@lists.postgresql.org; Wed, 25 Mar 2026 16:15:27 +0000 Received: from zcsmtaf01-pub.meteo.fr ([137.129.63.5]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w5Qt9-00000000zha-3Ec6 for pgsql-general@lists.postgresql.org; Wed, 25 Mar 2026 16:15:26 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by zcsmtaf01-pub.meteo.fr (Postfix) with ESMTP id 1179544A7228 for ; Wed, 25 Mar 2026 16:15:21 +0000 (GMT) Received: from zcsmtaf01-pub.meteo.fr ([127.0.0.1]) by localhost (zcsmtaf01.meteo.fr [127.0.0.1]) (amavis, port 10032) with ESMTP id bUdh8ZyLTvEj for ; Wed, 25 Mar 2026 16:15:21 +0000 (GMT) Received: from localhost (localhost.localdomain [127.0.0.1]) by zcsmtaf01-pub.meteo.fr (Postfix) with ESMTP id ED46144B85E2 for ; Wed, 25 Mar 2026 16:15:20 +0000 (GMT) X-Virus-Scanned: amavis at meteo.fr Received: from zcsmtaf01-pub.meteo.fr ([127.0.0.1]) by localhost (zcsmtaf01.meteo.fr [127.0.0.1]) (amavis, port 10026) with ESMTP id j5VtN0A2jdqL for ; Wed, 25 Mar 2026 16:15:20 +0000 (GMT) Received: from zcsmsm04.meteo.fr (zcsmsm04.meteo.fr [172.24.3.124]) by zcsmtaf01-pub.meteo.fr (Postfix) with ESMTP id D9A4C44A7228 for ; Wed, 25 Mar 2026 16:15:20 +0000 (GMT) Date: Wed, 25 Mar 2026 16:15:20 +0000 (GMT) From: PALAYRET Jacques To: pgsql-general@lists.postgresql.org Message-ID: <1748712738.372293199.1774455320476.JavaMail.zimbra@meteo.fr> In-Reply-To: <531047943.370846639.1774361183685.JavaMail.zimbra@meteo.fr> References: <531047943.370846639.1774361183685.JavaMail.zimbra@meteo.fr> Subject: Re: Logical replication in PostgreSQL Amount of subscriber vs publisher WALs Vacuuming MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_7c3fd60b-549d-4de6-91f2-82edb74a4008" X-Originating-IP: [172.24.2.157] X-Mailer: Zimbra 9.0.0_GA_4583 (ZimbraWebClient - FF128 (Win)/9.0.0_GA_4583) Thread-Topic: Logical replication in PostgreSQL Amount of subscriber vs publisher WALs Vacuuming Thread-Index: t5LlkICwqsRtXc/OMOLXOapVC6QOVBgfq2LN List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=_7c3fd60b-549d-4de6-91f2-82edb74a4008 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello,=20 Vacuuming seems to explain these differences.=20 Especially for large tables, vacuuming can generate many WAL.=20 Regards=20 De: "PALAYRET Jacques" =20 =C3=80: pgsql-general@lists.postgresql.org=20 Envoy=C3=A9: Mardi 24 Mars 2026 15:06:23=20 Objet: Logical replication in PostgreSQL Amount of subscriber vs publisher = WALs=20 Hello,=20 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 tab= le (table + index).=20 For example, an INSERT statement in an empty table (with 3 indexes) can gen= erate WALs twice the size of the table (table + index).=20 This difference (even for an INSERT) may seem surprising, but it's understa= ndable.=20 What's less intuitive is that, according to my tests, with logical replicat= ion in PostgreSQL, the amount of WAL generated by an SQL statement can be v= ery different between the subscriber server (the replica) and the publisher= server (the provider).=20 Is this accurate? Sometimes 1.5 or 2 times greater?=20 Regards=20 ----- M=C3=A9t=C3=A9o-France -----=20 PALAYRET Jacques=20 DCSC/GDC=20 jacques.palayret@meteo.fr=20 Fixe : +33 561078319=20 --=_7c3fd60b-549d-4de6-91f2-82edb74a4008 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hello,

Vacuuming seems to e= xplain these differences.
Especially for large tables, vacuuming can gen= erate many WAL.

Regards

De: "PALAYRET Jacques" <jacques.palayret@meteo.fr>
<= b>=C3=80: pgsql-general@lists.postgresql.org
Envoy=C3=A9: Mar= di 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 tab= le (table + index).
For example, an INSERT statement in an empty table (= with 3 indexes) can generate WALs twice the size of the table (table + inde= x).
This difference (even for an INSERT) may seem surprising, but it's u= nderstandable.

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 (t= he replica) and the publisher server (the provider).
Is this accurate? S= ometimes 1.5 or 2 times greater?

Regards
----- = M=C3=A9t=C3=A9o-France -----
PALAYRET Jacques
DCSC/GDC
jacques.pal= ayret@meteo.fr
Fixe : +33 561078319

--=_7c3fd60b-549d-4de6-91f2-82edb74a4008--