Re: Getting rid of OverrideSearhPath in namespace.c

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>
Subject: Re: Getting rid of OverrideSearhPath in namespace.c
Date: 2023-07-17 14:11:46
Message-ID: CAJ7c6TN+oLH-qEyMmDruA_hQm3EV6qUj4P_JTbVfq0YL=WsVdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> As a follow-up for the CVE-2023-2454 fix, I think that it makes sense to
> completely remove unsafe functions
> PushOverrideSearchPath()/PopOverrideSearchPath(), which are not used in the
> core now.
> Please look at the patch attached.
>
> [...]
>
> What do you think?

+1 to remove dead code.

The proposed patch however removes get_collation_oid(), apparently by
mistake. Other than that the patch looks fine and passes `make
installcheck-world`.

I added an entry to the nearest CF [1].

> Beside that, maybe it's worth to rename three functions in "Override" in
> their names: GetOverrideSearchPath(), CopyOverrideSearchPath(),
> OverrideSearchPathMatchesCurrent(), and then maybe struct OverrideSearchPath.
> Noah Misch proposed name GetSearchPathMatcher() for the former.

+1 as well. I added the corresponding 0002 patch.

[1] https://commitfest.postgresql.org/44/4447/

--
Best regards,
Aleksander Alekseev

Attachment Content-Type Size
v2-0002-Rename-OverrideSearchPath-to-SearchPathMatcher.patch application/octet-stream 8.4 KB
v2-0001-Remove-unused-search_path-override-stack.patch application/octet-stream 13.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2023-07-17 14:24:52 Re: logicalrep_message_type throws an error
Previous Message Ashutosh Bapat 2023-07-17 13:49:42 Re: logicalrep_message_type throws an error