pgsql: Extend pg_get_acl() to handle sub-object IDs

2024-07-09 Thread Michael Paquier
Extend pg_get_acl() to handle sub-object IDs This patch modifies the pg_get_acl() function to accept a third argument called "objsubid", bringing it on par with similar functions in this area like pg_describe_object(). This enables the retrieval of ACLs for relation attributes when scanning depen

pgsql: Prevent CRLF conversion of inputs in json_parser test module

2024-07-09 Thread Andrew Dunstan
Prevent CRLF conversion of inputs in json_parser test module Do this by opening the file in PG_BINARY_R mode. This prevents us from getting wrong byte count from stat(). Per complaint from Andres Freund Discussion: https://postgr.es/m/20240707052030.r77hbdkid3mwk...@awork3.anarazel.de Backpatc

pgsql: Prevent CRLF conversion of inputs in json_parser test module

2024-07-09 Thread Andrew Dunstan
Prevent CRLF conversion of inputs in json_parser test module Do this by opening the file in PG_BINARY_R mode. This prevents us from getting wrong byte count from stat(). Per complaint from Andres Freund Discussion: https://postgr.es/m/20240707052030.r77hbdkid3mwk...@awork3.anarazel.de Backpatc

pgsql: Remove new XML test cases added by e7192486d.

2024-07-09 Thread Tom Lane
Remove new XML test cases added by e7192486d. These turn out to produce libxml2-version-dependent error reports. They aren't adding value that would justify dealing with that, so just remove them again. (I had in fact guessed wrong about what versions matching xml_2.out would produce, but it does

pgsql: Fix missing invalidations for search_path cache.

2024-07-09 Thread Jeff Davis
Fix missing invalidations for search_path cache. Reported-by: Noah Misch Discussion: https://postgr.es/m/20240630223047.1f.nmi...@google.com Backpatch-through: 17 Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d3e076549b99d1130053223adb9c1fa909d75dc0 Modifi

pgsql: Fix missing invalidations for search_path cache.

2024-07-09 Thread Jeff Davis
Fix missing invalidations for search_path cache. Reported-by: Noah Misch Discussion: https://postgr.es/m/20240630223047.1f.nmi...@google.com Backpatch-through: 17 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b3bd18294ee471c5a6f1db69be57f08c1e00f1a6 Modified File

pgsql: Suppress "chunk is not well balanced" errors from libxml2.

2024-07-09 Thread Tom Lane
Suppress "chunk is not well balanced" errors from libxml2. libxml2 2.13 has an entirely different rule than earlier versions about when to emit "chunk is not well balanced" errors. This causes regression test output discrepancies for three test cases that formerly provoked that error (along with

Re: pgsql: Replace BackendIds with 0-based ProcNumbers

2024-07-09 Thread Thomas Munro
--- a/src/backend/libpq/pqmq.c +++ b/src/backend/libpq/pqmq.c @@ -26,7 +26,7 @@ static shm_mq_handle *pq_mq_handle; static bool pq_mq_busy = false; static pid_t pq_mq_parallel_leader_pid = 0; -static pid_t pq_mq_parallel_leader_backend_id = InvalidBackendId; +static pid_t pq_mq_parallel_leader_p

pgsql: Introduce pg_signal_autovacuum_worker.

2024-07-09 Thread Nathan Bossart
Introduce pg_signal_autovacuum_worker. Since commit 3a9b18b309, roles with privileges of pg_signal_backend cannot signal autovacuum workers. Many users treated the ability to signal autovacuum workers as a feature instead of a bug, so we are reintroducing it via a new predefined role. Having pri

pgsql: Unrevert "Force nodes for SSL tests to start in TCP mode"

2024-07-09 Thread Andrew Dunstan
Unrevert "Force nodes for SSL tests to start in TCP mode" This reverts commit 8b03d743a85fed4930645382a219cc75bdf7ab73. Release 12 required a little extra sauce to make it work, but this has been tested now. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d1

pgsql: Fix comment in libpqrcv_check_conninfo().

2024-07-09 Thread Fujii Masao
Fix comment in libpqrcv_check_conninfo(). Previously, the comment incorrectly stated that libpqrcv_check_conninfo() returns true or false based on the connection string check. However, this function actually has a void return type and raises an error if the check fails. Author: Rintaro Ikeda Revi

pgsql: Optimise numeric multiplication for short inputs.

2024-07-09 Thread Dean Rasheed
Optimise numeric multiplication for short inputs. When either input has a small number of digits, and the exact product is requested, the speed of numeric multiplication can be increased significantly by using a faster direct multiplication algorithm. This works by fully computing each result digi

pgsql: SQL/JSON: Various improvements to SQL/JSON query function docs

2024-07-09 Thread Amit Langote
SQL/JSON: Various improvements to SQL/JSON query function docs 1. Remove the keyword SELECT from the examples to be consistent with the examples of other JSON-related functions listed on the same page. 2. Add tags around the functions' syntax definition 3. Capitalize function names in the synta

pgsql: SQL/JSON: Various improvements to SQL/JSON query function docs

2024-07-09 Thread Amit Langote
SQL/JSON: Various improvements to SQL/JSON query function docs 1. Remove the keyword SELECT from the examples to be consistent with the examples of other JSON-related functions listed on the same page. 2. Add tags around the functions' syntax definition 3. Capitalize function names in the synta