pgsql: doc PG 18 relnotes: clarify btree skip-scan item

2025-05-23 Thread Bruce Momjian
doc PG 18 relnotes: clarify btree skip-scan item Reported-by: Peter Geoghegan Discussion: https://postgr.es/m/CAH2-Wzko57+sT=fcxhho7jnplhh35up_5aavogltj_d9bat...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/44ce4e1593b1821005b29ffaa19d9cbdd80747

pgsql: oauth: Correct missing comma in Requires.private

2025-05-23 Thread Jacob Champion
oauth: Correct missing comma in Requires.private I added libcurl to the Requires.private section of libpq.pc in commit b0635bfda, but I missed that the Autoconf side needs commas added explicitly. Configurations which used both --with-libcurl and --with-openssl ended up with the following entry:

pgsql: oauth: Limit JSON parsing depth in the client

2025-05-23 Thread Jacob Champion
oauth: Limit JSON parsing depth in the client Check the ctx->nested level as we go, to prevent a server from running the client out of stack space. The limit we choose when communicating with authorization servers can't be overly strict, since those servers will continue to add extensions in thei

pgsql: doc PG 18 relnotes: update to current

2025-05-23 Thread Bruce Momjian
doc PG 18 relnotes: update to current Includes runtime injection point item by Michael Paquier. Reported-by: Michael Paquier Author: Michael Paquier Discussion: https://postgr.es/m/adas0_ewzegl4...@paquier.xyz Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1ca5

pgsql: Fix per-relation memory leakage in autovacuum.

2025-05-23 Thread Tom Lane
Fix per-relation memory leakage in autovacuum. PgStat_StatTabEntry and AutoVacOpts structs were leaked until the end of the autovacuum worker's run, which is bad news if there are a lot of relations in the database. Note: pfree'ing the PgStat_StatTabEntry structs here seems a bit risky, because p

pgsql: Fix per-relation memory leakage in autovacuum.

2025-05-23 Thread Tom Lane
Fix per-relation memory leakage in autovacuum. PgStat_StatTabEntry and AutoVacOpts structs were leaked until the end of the autovacuum worker's run, which is bad news if there are a lot of relations in the database. Note: pfree'ing the PgStat_StatTabEntry structs here seems a bit risky, because p

pgsql: Fix per-relation memory leakage in autovacuum.

2025-05-23 Thread Tom Lane
Fix per-relation memory leakage in autovacuum. PgStat_StatTabEntry and AutoVacOpts structs were leaked until the end of the autovacuum worker's run, which is bad news if there are a lot of relations in the database. Note: pfree'ing the PgStat_StatTabEntry structs here seems a bit risky, because p

pgsql: Fix per-relation memory leakage in autovacuum.

2025-05-23 Thread Tom Lane
Fix per-relation memory leakage in autovacuum. PgStat_StatTabEntry and AutoVacOpts structs were leaked until the end of the autovacuum worker's run, which is bad news if there are a lot of relations in the database. Note: pfree'ing the PgStat_StatTabEntry structs here seems a bit risky, because p

pgsql: Fix AlignedAllocRealloc to cope sanely with OOM.

2025-05-23 Thread Tom Lane
Fix AlignedAllocRealloc to cope sanely with OOM. If the inner allocation call returns NULL, we should restore the previous state and return NULL. Previously this code pfree'd the old chunk anyway, which is surely wrong. Also, make it call MemoryContextAllocationFailure rather than summarily retu

pgsql: Fix AlignedAllocRealloc to cope sanely with OOM.

2025-05-23 Thread Tom Lane
Fix AlignedAllocRealloc to cope sanely with OOM. If the inner allocation call returns NULL, we should restore the previous state and return NULL. Previously this code pfree'd the old chunk anyway, which is surely wrong. Also, make it call MemoryContextAllocationFailure rather than summarily retu

pgsql: Revert function to get memory context stats for processes

2025-05-23 Thread Daniel Gustafsson
Revert function to get memory context stats for processes Due to concerns raised about the approach, and memory leaks found in sensitive contexts the functionality is reverted. This reverts commits 45e7e8ca9, f8c115a6c, d2a1ed172, 55ef7abf8 and 042a66291 for v18 with an intent to revisit this patc

pgsql: Move oauth_validator_libraries in postgresql.conf.sample

2025-05-23 Thread Peter Eisentraut
Move oauth_validator_libraries in postgresql.conf.sample Move oauth_validator_libraries in postgresql.conf.sample to be grouped with the other CONN_AUTH_AUTH settings, rather than making up a new ad-hoc category. This matches the internal categorization and also how it is listed in the documentat