pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Richard Guo <guofenglinux@gmail.com>
Cc: Thom Brown <thom@linux.com>
Cc: Jacob Brazeal <jacob.brazeal@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Cc: underdog@theori.io
Subject: Re: remove_useless_joins vs. bug #19560
Date: Sat, 26 Sep 2026 14:05:06 -0400
Message-ID: <79317.1790445906@sss.pgh.pa.us> (raw)
In-Reply-To: <20260926174457.13.noahmisch@microsoft.com>
References: <CAMbWs4-C4fwZTtY911MfAkW51G2d9TpqoRqmxCiJbjeO0GG1ug@mail.gmail.com>
	<839346.1787765112@sss.pgh.pa.us>
	<CAMbWs4-bgUE1SuNOgMmROhLJbRZz=f4bK7RJAEBQU9uCTSMBnQ@mail.gmail.com>
	<954541.1787846010@sss.pgh.pa.us>
	<CAMbWs4_mfPF5pQVT2FAdvjEMqN7pDT2MGJqkVoJLVyGLYAsU+w@mail.gmail.com>
	<1147476.1787924590@sss.pgh.pa.us>
	<CAMbWs484SQSdzWTgZYKvwtuC6J4m7acw0LfBjp3aWPvav7gC_w@mail.gmail.com>
	<598915.1789613519@sss.pgh.pa.us>
	<CAMbWs49LS9AMn-MV2Zm7xZ6kjZJMa4gVuH_h83nF=7U+0m322Q@mail.gmail.com>
	<CAMbWs48Vo7t2C6jH4aQHvFjkNAc=GCZMNyPY=G15rzw462keGA@mail.gmail.com>
	<20260926174457.13.noahmisch@microsoft.com>

Noah Misch <noah@leadboat.com> writes:
> security@ received a report about a regression in commit 2ebf25e.  On
> 2026-09-12, I told the reporter that we handle defects in unreleased code as
> non-vulnerabilities and asked them to report it to pgsql-hackers.  I didn't
> find that report, so I'm forwarding it here.
> ...
> The new SJE implementation groups the RTEs by physical relation OID without
> comparing their security qualifiers or permission identities.

Right.  I think the appropriate fix is probably to require
that the checkAsUser values match in RTEs we want to combine.
If we do that, I'm not sure that we need to consider securityQuals
as such (but I've not tried it so maybe I'm missing something).

The code 2ebf25e7d removed doesn't appear to have any particular
consideration for either checkAsUser or securityQuals, so I wonder
how it worked before.

			regards, tom lane






view thread (74+ messages)  latest in thread

Message-ID: <79317.1790445906@sss.pgh.pa.us>
Permalink:  ../79317.1790445906@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/79317.1790445906@sss.pgh.pa.us

 · 

reply

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, noah@leadboat.com, guofenglinux@gmail.com, thom@linux.com, jacob.brazeal@gmail.com, underdog@theori.io
  Subject: Re: remove_useless_joins vs. bug #19560
  In-Reply-To: <79317.1790445906@sss.pgh.pa.us>
  References: <CAMbWs4-C4fwZTtY911MfAkW51G2d9TpqoRqmxCiJbjeO0GG1ug@mail.gmail.com> <839346.1787765112@sss.pgh.pa.us> <CAMbWs4-bgUE1SuNOgMmROhLJbRZz=f4bK7RJAEBQU9uCTSMBnQ@mail.gmail.com> <954541.1787846010@sss.pgh.pa.us> <CAMbWs4_mfPF5pQVT2FAdvjEMqN7pDT2MGJqkVoJLVyGLYAsU+w@mail.gmail.com> <1147476.1787924590@sss.pgh.pa.us> <CAMbWs484SQSdzWTgZYKvwtuC6J4m7acw0LfBjp3aWPvav7gC_w@mail.gmail.com> <598915.1789613519@sss.pgh.pa.us> <CAMbWs49LS9AMn-MV2Zm7xZ6kjZJMa4gVuH_h83nF=7U+0m322Q@mail.gmail.com> <CAMbWs48Vo7t2C6jH4aQHvFjkNAc=GCZMNyPY=G15rzw462keGA@mail.gmail.com> <20260926174457.13.noahmisch@microsoft.com> <79317.1790445906@sss.pgh.pa.us>

* 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