Assert failure with MERGE into partitioned table with RLS - Mailing list pgsql-hackers

From Dean Rasheed
Subject Assert failure with MERGE into partitioned table with RLS
Date
Msg-id CAEZATCWWFtQmW67F3XTyMU5Am10Oxa_b8oe0x+Nu5Mo+CdRErg@mail.gmail.com
Whole thread Raw
Responses Re: Assert failure with MERGE into partitioned table with RLS
List pgsql-hackers
As part of the MERGE RETURNING patch I noticed a suspicious Assert()
in ExecInitPartitionInfo() that looked like it needed updating for
MERGE.

After more testing, I can confirm that this is indeed a pre-existing
bug, that can be triggered using MERGE into a partitioned table that
has RLS enabled (and hence non-empty withCheckOptionLists to
initialise).

So I think we need something like the attached.

Regards,
Dean

Attachment

pgsql-hackers by date:

Previous
From: Markur Sens
Date:
Subject: Re: pg_crc32c_armv8.c:35:9: error: implicit declaration of function '__crc32cb' is invalid in C99
Next
From: Andres Freund
Date:
Subject: Re: Add WAL read stats to pg_stat_wal