From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: usamoi@outlook.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18637: CREATE INDEX won't look up operator classes in search_path if PARTITION BY is specified
Date: Wed, 02 Oct 2024 23:19:03 -0400
Message-ID: <231375.1727925543@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApHDvrmBSTA8-Sv=HEQvrPO8QDPLB7y0d0gJweBQe2c8PMGYw@mail.gmail.com>
References: <18637-f51e314546e3ba2a@postgresql.org>
<CAApHDvrmBSTA8-Sv=HEQvrPO8QDPLB7y0d0gJweBQe2c8PMGYw@mail.gmail.com>
David Rowley <dgrowleyml@gmail.com> writes:
> There's an item in the release notes [1] which should be expended to
> mention this as an incompatibility, namely:
> "Change functions to use a safe search_path during maintenance
> operations (Jeff Davis) ยง
I have not dug into the code, but I think this may actually be a
bug; not because of the change of search path, but because it looks
like the opclass is probably being looked up more than once during
the command, with different search paths. That has security
implications, and not good ones. We should fix this so that the
opclass is looked up exactly once, and passed down to the partitions
by OID not name.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, usamoi@outlook.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18637: CREATE INDEX won't look up operator classes in search_path if PARTITION BY is specified
In-Reply-To: <231375.1727925543@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