From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix Assert failure for MERGE into a partitioned table with RLS.
Date: Wed, 22 Feb 2023 10:56:59 +0000
Message-ID: <E1pUmny-0007L3-Sm@gemulon.postgresql.org> (raw)
Fix Assert failure for MERGE into a partitioned table with RLS.
In ExecInitPartitionInfo(), the Assert when building the WITH CHECK
OPTION list for the new partition assumed that the command would be an
INSERT or UPDATE, but it can also be a MERGE. This can be triggered by
a MERGE into a partitioned table with RLS checks to enforce.
Fix, and back-patch to v15, where MERGE was introduced.
Discussion: https://postgr.es/m/CAEZATCWWFtQmW67F3XTyMU5Am10Oxa_b8oe0x%2BNu5Mo%2BCdRErg%40mail.gmail.com
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/d8c3b65db58db0a074dc9f7e27846e22e9dc579f
Modified Files
--------------
src/backend/executor/execPartition.c | 10 +++++++---
src/test/regress/expected/merge.out | 12 ++++++++++++
src/test/regress/sql/merge.sql | 12 ++++++++++++
3 files changed, 31 insertions(+), 3 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: dean.a.rasheed@gmail.com
Subject: Re: pgsql: Fix Assert failure for MERGE into a partitioned table with RLS.
In-Reply-To: <E1pUmny-0007L3-Sm@gemulon.postgresql.org>
References: <E1pUmny-0007L3-Sm@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox