Re: BUG #18637: CREATE INDEX won't look up operator classes in search_path if PARTITION BY is specified
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: usamoi@outlook.com, pgsql-bugs@lists.postgresql.org
Date: 2024-10-03T03:19:03Z
Lists: pgsql-bugs
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
Commits
-
Use generateClonedIndexStmt to propagate CREATE INDEX to partitions.
- fee8cb947346 17.1 landed
- 68dfecbef210 18.0 landed