Re: Segfault on logical replication to partitioned table with foreign children

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: ilya(dot)v(dot)gladyshev(at)gmail(dot)com
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Segfault on logical replication to partitioned table with foreign children
Date: 2022-10-30 09:46:01
Message-ID: CAFiTN-vvnrvHeUibhwhnJNgTyE70DcBTgXPws3iO7HVM9TWANg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Oct 29, 2022 at 1:01 AM <ilya(dot)v(dot)gladyshev(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-10-30 13:39:21 Re: Segfault on logical replication to partitioned table with foreign children
Previous Message Andy Fan 2022-10-30 09:16:50 Re: How to started with Contributions