pgsql: Enable Python Limited API for PL/Python on MSVC

2026-01-14 Thread Peter Eisentraut
Enable Python Limited API for PL/Python on MSVC Previously, the Python Limited API was disabled on MSVC due to build failures caused by Meson not knowing to link against python3.lib instead of python3XX.lib when using the Limited API. This commit works around the Meson limitation by explicitly fi

pgsql: pg_waldump: Relax LSN comparison check in TAP test

2026-01-14 Thread Michael Paquier
pg_waldump: Relax LSN comparison check in TAP test The test 002_save_fullpage.pl, checking --save-fullpage fails with wal_consistency_checking enabled, due to the fact that the block saved in the file has the same LSN as the LSN used in the file name. The test required that the block LSN is strit

pgsql: pg_waldump: Relax LSN comparison check in TAP test

2026-01-14 Thread Michael Paquier
pg_waldump: Relax LSN comparison check in TAP test The test 002_save_fullpage.pl, checking --save-fullpage fails with wal_consistency_checking enabled, due to the fact that the block saved in the file has the same LSN as the LSN used in the file name. The test required that the block LSN is strit

pgsql: Use more consistent *GetDatum() macros for some unsigned numbers

2026-01-14 Thread Michael Paquier
Use more consistent *GetDatum() macros for some unsigned numbers This patch switches some code paths to use GetDatum() macros more in line with the data types of the variables they manipulate. This set of changes does not fix a problem, but it is always nice to be more consistent across the board

pgsql: Prevent unintended dropping of active replication origins.

2026-01-14 Thread Amit Kapila
Prevent unintended dropping of active replication origins. Commit 5b148706c5 exposed functionality that allows multiple processes to use the same replication origin, enabling non-builtin logical replication solutions to implement parallel apply for large transactions. With this functionality, if

pgsql: Revert "Replace pg_restrict by standard restrict"

2026-01-14 Thread Peter Eisentraut
Revert "Replace pg_restrict by standard restrict" This reverts commit f0f2c0c1aef95757c4e7f144d5577e2b0d814279. The original problem that led to the use of pg_restrict was that MSVC couldn't handle plain restrict, and defining it to something else would conflict with its __declspec(restrict) that

pgsql: pg_waldump: Relax LSN comparison check in TAP test

2026-01-14 Thread Michael Paquier
pg_waldump: Relax LSN comparison check in TAP test The test 002_save_fullpage.pl, checking --save-fullpage fails with wal_consistency_checking enabled, due to the fact that the block saved in the file has the same LSN as the LSN used in the file name. The test required that the block LSN is strit

pgsql: doc: Slightly correct advice on C/C++ linkage

2026-01-14 Thread Peter Eisentraut
doc: Slightly correct advice on C/C++ linkage The documentation was writing that extern C should be used, but it should be extern "C". Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/794ba8b6a4c8ce409a37e8c9519f7f1e5385 Modified Files -- doc/src/sgm

pgsql: lwlock: Improve local variable name

2026-01-14 Thread Andres Freund
lwlock: Improve local variable name In 9a385f61666 I used the variable name new_release_in_progress, but new_wake_in_progress makes more sense given the flag name. Suggested-by: Chao Li Discussion: https://postgr.es/m/[email protected] Branch -- master Details

pgsql: Reword confusing comment to avoid "typo fixes"

2026-01-14 Thread Álvaro Herrera
Reword confusing comment to avoid "typo fixes" Author: Álvaro Herrera Reviewed-by: David Rowley Reviewed-by: John Naylor Discussion: https://postgr.es/m/CAApHDvqPmpa53jcTmfU8arFFm7=hB5cFoXX5dcUH=1qv0tr...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commi

pgsql: Remove redundant assignment in CreateWorkExprContext

2026-01-14 Thread Jeff Davis
Remove redundant assignment in CreateWorkExprContext In CreateWorkExprContext(), maxBlockSize is initialized to ALLOCSET_DEFAULT_MAXSIZE, and it then immediately reassigned, thus the initialization is a redundant. Author: Andreas Karlsson Reported-by: Chao Li Reviewed-by: Tom Lane Discussion:

pgsql: Introduce routines to validate and free MVNDistinct and MVDepend

2026-01-14 Thread Michael Paquier
Introduce routines to validate and free MVNDistinct and MVDependencies These routines are useful to perform some basic validation checks on each object structure, working currently on attribute numbers for non-expression and expression attnums. These checks could be extended in the future. Note