| 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-11-27 14:11:52 |
| Message-ID: | CAB5wL7YsTunj6cONwu7=siTmj6jBFKiBoQFUkcjC_rEU+_dpfg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
> I'm not sure why 2 test tables (`tab_4` and `tab_5`) are needed. Isn't
> one enough?
Yes. v4 uses only tab_4.
> It's a bit overkill to insert 100+ rows to test this. Maybe do less
> work to make tests more efficient.
v4 inserts single rows. I also dropped the restart (DISABLE/ENABLE)
case. The 024 test now checks the first report, no repeat after DDL,
applying after REFRESH, and a second report after the table is removed
from the subscription again.
> OK, that's like what I meant. Although I am not sure if
> SUBREL_STATE_INIT_LAST_UNAPPLIED would be better defined adjacent to
> all the other non-stored SUBREL_XXX.
Moved to pg_subscription_rel.h, after SUBREL_STATE_CATCHUP.
> Meanwhile, I won't review this patch further until more people review
> it and agree that this state-based logging is the best strategy.
Understood. Shveta found that v3 logged once per streamed transaction,
because the state was lost each time the relation map entry was rebuilt.
v4 fixes that, so the behaviour is now what I described earlier: once per
sync state, and again after changes have been applied in between
Regards,
Demir.
| Attachment | Content-Type | Size |
|---|---|---|
| v4-0001-log-unapplied-changes-for-non-ready-relations.patch | application/octet-stream | 15.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Hüseyin Demir | 2026-11-27 14:07:47 | Re: [PATCH] Report changes discarded for relations not in the subscription |