| From: | Zhijie Hou <houzhijie22(at)gmail(dot)com> |
|---|---|
| To: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
| Cc: | Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, "ashutosh(dot)bapat(dot)oss(at)gmail(dot)com" <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, shveta malik <shvetamalik(at)gmail(dot)com> |
| Subject: | Re: Crashes on a partition whose concurrent detach never finished |
| Date: | 2026-11-11 14:34:35 |
| Message-ID: | 5b00c4a1-5c86-475a-a5a4-c132970dd429@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Wed, Nov11, 2026 at 05:06 PM shveta malik wrote:
> On Wed, Nov 11, 2026 at 1:05 PM Zhijie Hou <houzhijie22(at)gmail(dot)com> wrote:
> > Since we are considering whether to push 0001 first, I reviewed it
> > and have few suggestions:
> >
> > 1. We can remove the am_partition variable completely and simply check
> > "ancestors" in the subsequent code, to be consistent with
> > RelationBuildPublicationDesc.
> >
> > 2. The test can be simplified to cover only the decoding crash (since
> > the subscriber side is not touched by this patch), which saves
> > buildfarm test time. In addition, we can move the test into the
> > existing isolation test to speed it up further.
> >
> > I have attached a top-up patch for 0001 with these changes. Feel
> > free to merge it if it looks good.
>
> I agree with the changes. Few concerns:
Thanks for reviewing.
>
> It would be better to show in the additional steps that
> pg_inherits.inhdetachpending is true before we actually try
> pg_logical_slot_get_binary_changes.
I checked that no existing tests (either for DETACH CONCURRENTLY or
otherwise) refer to the inhdetachpendin in their test cases, and since
our test basically tests the DETACH behavior as well, I think it's fine
to skip testing this.
>
> Also I feel it would make more sense to create-pub with default
> publish_via_partition_root rather than publish_via_partition_root=true
> for PG19's testcase.
Changed as suggested.
After some analysis, I think creating slots in src/test/isolation/
wouldn't be stable, since some buildfarm animals may run the main
regression tests under wal_level=minimal. I also didn't find slot
creation in the main isolation tests. So I chose to put the test in
test_decoding/concurrent_ddl_dml.spec, which has precedent for creating
slots with pgoutput under test_decoding tests, so it can be acceptable.
I'm helping to merge the changes into 0001 and preparing patches for all
branches, hoping to close this item soon.
--
Best Regards,
Zhijie Hou
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-Fix-crash-decoding-a-change-to-a-partition-pendin-PG15-PG16.patch | text/plain | 10.4 KB |
| v3-0001-Fix-crash-decoding-a-change-to-a-partition-pendin-PG17-PG18.patch | text/plain | 10.5 KB |
| v3-0001-Fix-crash-decoding-a-change-to-a-partition-pendin.patch | text/plain | 10.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | he kuang | 2026-11-11 14:42:32 | Re: [PATCH 0/2] Fix two hash join costing errors in final_cost_hashjoin() |
| Previous Message | João Rito | 2026-11-11 14:27:39 | Re: [PATCH] Add recovery boundary WAL record for database and tablespace commands |