Re: pgsql: Fix search_path to a safe value during maintenance operations.

2023-06-14 Thread Jeff Davis
On Tue, 2023-06-13 at 16:23 -0400, Tom Lane wrote: > What I'm concerned about is making such a fundamental semantics > change > post-beta1. I have added the patch to the July CF for v17. If someone does feel like something should be done for v16, David G. Johnston posted one possibility here: ht

pgsql: intarray: Prevent out-of-bound memory reads with gist__int_ops

2023-06-14 Thread Michael Paquier
intarray: Prevent out-of-bound memory reads with gist__int_ops As gist__int_ops stands in intarray, it is possible to store GiST entries for leaf pages that can cause corruptions when decompressed. Leaf nodes are stored as decompressed all the time by the compression method, and the decompression

pgsql: intarray: Prevent out-of-bound memory reads with gist__int_ops

2023-06-14 Thread Michael Paquier
intarray: Prevent out-of-bound memory reads with gist__int_ops As gist__int_ops stands in intarray, it is possible to store GiST entries for leaf pages that can cause corruptions when decompressed. Leaf nodes are stored as decompressed all the time by the compression method, and the decompression

pgsql: intarray: Prevent out-of-bound memory reads with gist__int_ops

2023-06-14 Thread Michael Paquier
intarray: Prevent out-of-bound memory reads with gist__int_ops As gist__int_ops stands in intarray, it is possible to store GiST entries for leaf pages that can cause corruptions when decompressed. Leaf nodes are stored as decompressed all the time by the compression method, and the decompression

pgsql: intarray: Prevent out-of-bound memory reads with gist__int_ops

2023-06-14 Thread Michael Paquier
intarray: Prevent out-of-bound memory reads with gist__int_ops As gist__int_ops stands in intarray, it is possible to store GiST entries for leaf pages that can cause corruptions when decompressed. Leaf nodes are stored as decompressed all the time by the compression method, and the decompression

pgsql: intarray: Prevent out-of-bound memory reads with gist__int_ops

2023-06-14 Thread Michael Paquier
intarray: Prevent out-of-bound memory reads with gist__int_ops As gist__int_ops stands in intarray, it is possible to store GiST entries for leaf pages that can cause corruptions when decompressed. Leaf nodes are stored as decompressed all the time by the compression method, and the decompression

pgsql: intarray: Prevent out-of-bound memory reads with gist__int_ops

2023-06-14 Thread Michael Paquier
intarray: Prevent out-of-bound memory reads with gist__int_ops As gist__int_ops stands in intarray, it is possible to store GiST entries for leaf pages that can cause corruptions when decompressed. Leaf nodes are stored as decompressed all the time by the compression method, and the decompression

pgsql: Fix possible crash in tablesync worker.

2023-06-14 Thread Amit Kapila
Fix possible crash in tablesync worker. Commit c3afe8cf5a added a new password_required option but forgot that you need database access to check whether an arbitrary role ID is a superuser. Commit e7e7da2f8d fixed a similar bug in apply worker, and this patch fixes a similar bug in tablesync work

pgsql: Make parseNodeString() C idiom compatible with Visual Studio 201

2023-06-14 Thread Noah Misch
Make parseNodeString() C idiom compatible with Visual Studio 2015. Between v15 and now, this function's "else if" chain grew from 252 lines to 592 lines, exceeding a compiler limit that manifests as "fatal error C1026: parser stack overflow, program too complex (compiling source file src/backend/n

pgsql: Retain relkind too in RTE_SUBQUERY entries for views.

2023-06-14 Thread Amit Langote
Retain relkind too in RTE_SUBQUERY entries for views. 47bb9db75 modified the ApplyRetrieveRule()'s conversion of a view's original RTE_RELATION entry into an RTE_SUBQUERY one to retain relid, rellockmode, and perminfoindex so that the executor can lock the view and check its permissions. It seems