pgsql: meson: Prevent installation of test files during main install

2023-03-02 Thread Peter Eisentraut
meson: Prevent installation of test files during main install Previously, meson installed modules under src/test/modules/ as part of a normal installation, even though these files are only meant for use by tests. This is because there is no way to set up up the build system to install extra thing

pgsql: Fix incorrect format placeholders

2023-03-02 Thread Peter Eisentraut
Fix incorrect format placeholders Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b1307b8b60111be8ddd8d6127701883c047bed15 Modified Files -- src/backend/utils/adt/jsonb_util.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

pgsql: Force testing of query jumbling in 027_stream_regress.pl

2023-03-02 Thread Michael Paquier
Force testing of query jumbling in 027_stream_regress.pl Coverage of the query jumbling code has always relied on the queries included in the regression tests of pg_stat_statements. This has its limitations, as a lot of query patterns have never really stressed the query jumbling code. The situa

pgsql: Refactor more the regression tests of pg_stat_statements

2023-03-02 Thread Michael Paquier
Refactor more the regression tests of pg_stat_statements This commit expands more the refactoring of the regression tests of pg_stat_statements, with tests moved out of pg_stat_statements.sql into separate files. The following file structure is now used: - select is mostly the former pg_stat_stat

pgsql: Harden new test case against force_parallel_mode = regress.

2023-03-02 Thread Tom Lane
Harden new test case against force_parallel_mode = regress. Per buildfarm: worker processes can't see a role created in the current transaction. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/98a88bc2bcd60e41ca70e2f1e13eee827e23eefb Modified Files -- s

pgsql: Show "internal name" not "source code" in psql's \df+ command.

2023-03-02 Thread Tom Lane
Show "internal name" not "source code" in psql's \df+ command. Our previous habit of showing the full function body is really pretty unfriendly for tabular viewing of functions, and now that we have \sf and \ef commands there seems no good reason why \df+ has to do it. It still seems to make sens

pgsql: Don't leak descriptors into subprograms.

2023-03-02 Thread Thomas Munro
Don't leak descriptors into subprograms. Open long-lived data and WAL file descriptors with O_CLOEXEC. This flag was introduced by SUSv4 (POSIX.1-2008), and by now all of our target Unix systems have it. Our open() implementation for Windows already had that behavior, so provide a dummy O_CLOEXE

pgsql: Mop up some undue familiarity with the innards of Bitmapsets.

2023-03-02 Thread Tom Lane
Mop up some undue familiarity with the innards of Bitmapsets. nodeAppend.c used non-nullness of appendstate->as_valid_subplans as a state flag to indicate whether it'd done ExecFindMatchingSubPlans (or some sufficient approximation to that). This was pretty questionable even in the beginning, sin

pgsql: Require empty Bitmapsets to be represented as NULL.

2023-03-02 Thread Tom Lane
Require empty Bitmapsets to be represented as NULL. When I designed the Bitmapset module, I set things up so that an empty Bitmapset could be represented either by a NULL pointer, or by an allocated object all of whose bits are zero. I've recently come to the conclusion that that was a bad idea a

pgsql: Remove local optimizations of empty Bitmapsets into null pointer

2023-03-02 Thread Tom Lane
Remove local optimizations of empty Bitmapsets into null pointers. These are all dead code now that it's done centrally. Patch by me; thanks to Nathan Bossart and Richard Guo for review. Discussion: https://postgr.es/m/1159933.1677621...@sss.pgh.pa.us Branch -- master Details --- https

pgsql: Remove bms_first_member().

2023-03-02 Thread Tom Lane
Remove bms_first_member(). This function has been semi-deprecated ever since we invented bms_next_member(). Its habit of scribbling on the input bitmapset isn't great, plus for sufficiently large bitmapsets it would take O(N^2) time to complete a loop. Now we have the additional problem that red

pgsql: Mark options as deprecated in usage output

2023-03-02 Thread Daniel Gustafsson
Mark options as deprecated in usage output Some deprecated options were not marked as such in usage output. This does so across the installed binaries in an attempt to provide consistent markup for this. Reviewed-by: Heikki Linnakangas Discussion: https://postgr.es/m/062c6a8a-a4e8-4f52-9e31-45f

pgsql: Fix outdated references to guc.c

2023-03-02 Thread Daniel Gustafsson
Fix outdated references to guc.c Commit 0a20ff54f split out the GUC variables from guc.c into a new file guc_tables.c. This updates comments referencing guc.c regarding variables which are now in guc_tables.c. Reviewed-by: Tom Lane Discussion: https://postgr.es/m/6b50c70c-8c1f-4f9a-a7c0-eeafcc03