Re: Logical replication can lose an update after concurrent index invalidation

From: Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, onderkalaci(at)gmail(dot)com
Subject: Re: Logical replication can lose an update after concurrent index invalidation
Date: 2026-08-28 11:14:57
Message-ID: CADzfLwX_g63_4jMuRGwwo6tWsTSZ2C0+7Bbgm0ctkNovfaV4aw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

> RelationFindReplTupleByIndex() is an extern function declared in a
> core executor header (executor.h). Adding a new parameter
> (isIdxSafeToSkipDuplicates) changes its calling convention.
> Similarly I'm not sure of adding isidentity to LogicalRepRelMapEntry
> in back branches as it will change its size and memory layout.

Yep, fair, thanks.

In v2 I put a new flag into padding and used the same pattern for the
function as in 9e47718250d.

abidiff now shows that:

'struct LogicalRepRelMapEntry' changed:
type size hasn't changed
1 data member insertion:
'bool isidentity', at offset 89 (in bytes)

I think it is ok for such a type. I couldn't find any usage in extensions.

Should we update .abi-compliance-history in such a case?

Best regards,
Mikhail.

Attachment Content-Type Size
nocfbot-v2-REL_17_STABLE.patch application/octet-stream 13.9 KB
nocfbot-v2-REL_16_STABLE.patch application/octet-stream 13.9 KB
nocfbot-v2-REL_18_STABLE.patch application/octet-stream 13.5 KB
v2-master.patch application/octet-stream 24.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-08-28 11:16:55 Re: Offline data checksum changes can cause incorrect checksum state on standbys
Previous Message Amit Kapila 2026-08-28 11:08:17 Re: [PATCH] Release replication slot on error in SQL-callable slot functions