Re: Conflict detection for update_deleted in logical replication

From: Michail Nikolaev <michail(dot)nikolaev(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Smith <smithpb2250(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
Subject: Re: Conflict detection for update_deleted in logical replication
Date: 2024-10-30 11:31:29
Message-ID: CANtu0ogCnFSDiWmb76PRqBL6BMyKD50tbASHtDAFNtu7CyjqMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Hayato!

> Note that apply workers can stop due to some reasons (e.g., disabling
subscriptions,
> error out, deadlock...). In this case, the snapshot cannot eb registered
by the
> worker and index can be re-built during the period.

However, the xmin of a slot affects replication_slot_xmin in
ProcArrayStruct, so it might
be straightforward to wait for it during concurrent index builds. We could
consider adding
a separate conflict_resolution_replication_slot_xmin to wait only for that.

> Anyway, this topic introduces huge complexity and is not mandatory for
update_deleted
> detection. We can work on it in later versions based on the needs.

From my perspective, this is critical for databases. REINDEX CONCURRENTLY
is typically run
in production databases on regular basic, so any master-master system
should be unaffected by it.

Best regards,
Mikhail.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2024-10-30 11:34:55 Re: protocol-level wait-for-LSN
Previous Message Heikki Linnakangas 2024-10-30 11:29:01 Re: AIO writes vs hint bits vs checksums