Re: Segfault on logical replication to partitioned table with foreign children - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: Segfault on logical replication to partitioned table with foreign children
Date
Msg-id CAFiTN-vvnrvHeUibhwhnJNgTyE70DcBTgXPws3iO7HVM9TWANg@mail.gmail.com
Whole thread Raw
In response to Segfault on logical replication to partitioned table with foreign children  (ilya.v.gladyshev@gmail.com)
Responses Re: Segfault on logical replication to partitioned table with foreign children  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, Oct 29, 2022 at 1:01 AM <ilya.v.gladyshev@gmail.com> wrote:
>
> Right now it is possible to add a partitioned table with foreign tables
> as its children as a target of a subscription. It can lead to an assert
> (or a segfault, if compiled without asserts) on a logical replication
> worker when the worker attempts to insert the data received via
> replication into the foreign table. Reproduce with caution, the worker
> is going to crash and restart indefinitely. The setup:

Yes, this looks like a bug and your fix seems correct to me.  It would
be nice to add a test case for this scenario.

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Andy Fan
Date:
Subject: Re: How to started with Contributions
Next
From: Tom Lane
Date:
Subject: Re: Segfault on logical replication to partitioned table with foreign children