Re: [PATCH] Report changes discarded for relations not in the subscription

From: Hüseyin Demir <huseyin(dot)d3r(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Report changes discarded for relations not in the subscription
Date: 2026-12-03 05:13:12
Message-ID: CAB5wL7Z-pQMVXjSJ=HxZHh6TmafyG5AKxYW3zMWrUCetxHJFjg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for the review. All three points are addressed in the attached v7.

> 1.
> #define SUBREL_STATE_INIT_LAST_UNAPPLIED '?'

Agreed, the similarity to SUBREL_STATE_INIT is misleading. Renamed to
SUBREL_STATE_LAST_UNAPPLIED_NONE.

> 2.
> ... the placement of this new field has split `state` and `statelsn`
> ... Suggests putting your new field last.

Done. last_unapplied_state is now the last field of
LogicalRepRelMapEntry, so state and statelsn are together again under
their "Sync state." comment.

> 3.
> ... other wait_for_log(...) are not wrapped in ok(), so the
> ones in this patch didn't need to be either.

Right. wait_for_log() dies on timeout rather than returning false, so
the ok() did not add anything, and no other test wraps it. v7 calls
wait_for_log() directly in both 024_add_drop_pub.pl and 015_stream.pl,
still with the combined LOG and DETAIL regex. There are no behaviour
changes. 024_add_drop_pub and 015_stream pass.

Regards,
Demir.

Attachment Content-Type Size
v7-0001-log-unapplied-changes-for-non-ready-relations.patch application/octet-stream 15.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2026-12-03 05:23:55 Re: DOC: Minor updates for logical replication conflicts
Previous Message Andreas Karlsson 2026-12-03 04:56:30 Re: [PATCH] Handle SQL NULL results from casts in JSON generation