Unnecessary confirm work on logical replication

From: Emre Hasegeli <emre(at)hasegeli(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Unnecessary confirm work on logical replication
Date: 2023-04-07 17:35:18
Message-ID: CAE2gYzwsJ_ji2CncRn1ZbCTtfvOFL5Sy=Zm2kVqAzmCFAvCSTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I was reading the logical replication code and found a little
unnecessary work we are doing.

The confirmed_flushed_lsn cannot reasonably be ahead of the
current_lsn, so there is no point of calling
LogicalConfirmReceivedLocation() every time we update the candidate
xmin or restart_lsn.

Patch is attached.

Attachment Content-Type Size
v00-eliminate-unnecessary-confirm-work-on-logical-replication.patch application/octet-stream 4.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-04-07 18:12:26 Re: Minimal logical decoding on standbys
Previous Message Tom Lane 2023-04-07 17:32:22 Re: Fix the description of GUC "max_locks_per_transaction" and "max_pred_locks_per_transaction" in guc_table.c