Re: Fix RLS checks for UPDATE/DELETE FOR PORTION OF leftover rows

From: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
To: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: Fix RLS checks for UPDATE/DELETE FOR PORTION OF leftover rows
Date: 2026-07-02 18:17:31
Message-ID: CAJTYsWV2wkuY27B9s9pSRFzr+cX259+tL0XMcSrpxkCuQwL3rA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Thu, 2 Jul 2026 at 23:36, Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>
wrote:

> > Is this the right way to do these checks? I'll try to look into it a
> > bit more today, but does this cause problems when an UPDATE *doesn't*
> > create leftovers?
>
> I did some extra testing but couldn't find any problems. I looked at
> INSERT policies when FOR PORTION OF exactly matches a row's bounds (so
> the row is updated but there are no leftovers), and also INSERT
> policies that include sublinks.
>
> > We should update the documentation as well. I think it should point
> > out the contrast between ACLs and RLS here.
>
> Here is a v2 with a couple lines of documentation added.
>

I had reviewed v1 and it looked good to me, assuming v2
changes just added the RLS policies documentation update, the patch
addresses my concern and looks good to me!

Regards,
Ayush

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2026-07-02 18:47:48 Re: Truncate logs by max_log_size
Previous Message Nathan Bossart 2026-07-02 18:11:06 Re: bump minimum supported version of psql and pg_{dump,dumpall,upgrade} to v10