Replica and transaction

From: kaido vaikla <kaido(dot)vaikla(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Replica and transaction
Date: 2025-02-18 16:59:38
Message-ID: CA+427g-91rw4Rb=+Hd2Y4jaqVMK=LViN2Pun=4TV+KhqgBi8_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

I found a statement:

Long-running transactions can cause replication lag because the changes
made by these transactions are not replicated until the transaction is
committed.
(https://www.percona.com/blog/replication-lag-in-postgresql/)

It means:
change made by transaction is not replicated until the transaction is
committed?

And for example
time0: wal on primary
time1: tx1 begin
time2: tx2 begin
time3: tx2 rollback
time4: tx3 begin
time5: tx3 commit
time6: tx1 commit
time7: walsender sends tx1, tx3 to replica, tx2 skipped because rollback
?

br
Kaido

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ron Johnson 2025-02-18 18:24:26 Feature Request: multithreaded reindexdb --concurrently of a single table
Previous Message rams nalabolu 2025-02-18 15:19:25 Re: My Pgbackrest Backups Take Up Too Much Space