pgsql: Convert macros to static inline functions (block.h)

2022-07-06 Thread Peter Eisentraut
Convert macros to static inline functions (block.h) Remove BlockIdIsValid(), which wasn't used and is unnecessary. Remove BlockIdCopy(), which wasn't used and can be done by struct assignment. (BlockIdEquals() also isn't used, but seems reasonable to keep around.) Reviewed-by: Amul Sul Discuss

pgsql: Make Windows 10 the minimal runtime requirement for WIN32

2022-07-06 Thread Michael Paquier
Make Windows 10 the minimal runtime requirement for WIN32 This commit bumps the runtime value of _WIN32_WINNT to be 0x0A00 for any builds on Windows. Hence, this makes Windows 10 the minimal requirement when running PostgreSQL under WIN32, be it for builds of Cygwin, MinGW or Visual Studio. The

pgsql: Re-order disable_on_error in tab-complete.

2022-07-06 Thread Amit Kapila
Re-order disable_on_error in tab-complete. By convention, the tab-complete subscription parameters are listed in the COMPLETE_WITH lists in alphabetical order, but when the "disable_on_error" parameter was introduced this was not done. This patch just tidies that up. Reported-by: Peter Smith Aut

pgsql: Re-order disable_on_error in tab-complete.

2022-07-06 Thread Amit Kapila
Re-order disable_on_error in tab-complete. By convention, the tab-complete subscription parameters are listed in the COMPLETE_WITH lists in alphabetical order, but when the "disable_on_error" parameter was introduced this was not done. This patch just tidies that up. Reported-by: Peter Smith Aut

pgsql: Clean up some includes and comments in TAP test scripts

2022-07-06 Thread Michael Paquier
Clean up some includes and comments in TAP test scripts A few tests included File::Path::rmtree without using it, and a comment related to the segment size for replication slot limits was wrong. Author: Pavel Borisov, Bharath Rupireddy Reviewed-by: Maxim Orlov Discussion: https://postgr.es/m/CAL

pgsql: pgstat: slru: remove outdated comment

2022-07-06 Thread Andres Freund
pgstat: slru: remove outdated comment That comment might have been true at some point during development, but definitely isn't anymore. Reported-By: Melanie Plageman Backpatch: 15- Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/9d51c628c4a0a9affa1d4c84e596

pgsql: pgstat: slru: remove outdated comment

2022-07-06 Thread Andres Freund
pgstat: slru: remove outdated comment That comment might have been true at some point during development, but definitely isn't anymore. Reported-By: Melanie Plageman Backpatch: 15- Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f4d3ca421d9c67d55e527f74dde515d7f87

pgsql: Fix wrong field order in _readMergeWhenClause().

2022-07-06 Thread Tom Lane
Fix wrong field order in _readMergeWhenClause(). We hadn't noticed this because it's dead code: there is no situation where we read raw parse trees from text format. So maybe the right fix is to remove the function altogether, but I'll forbear for now; it's not the only dead code in readfuncs.c, I

pgsql: Fix wrong field order in _readMergeWhenClause().

2022-07-06 Thread Tom Lane
Fix wrong field order in _readMergeWhenClause(). We hadn't noticed this because it's dead code: there is no situation where we read raw parse trees from text format. So maybe the right fix is to remove the function altogether, but I'll forbear for now; it's not the only dead code in readfuncs.c, I

pgsql: pg_stat_statements: Fix test that assumes wal_records = rows.

2022-07-06 Thread Robert Haas
pg_stat_statements: Fix test that assumes wal_records = rows. It's not very robust to assume that each inserted row will produce exactly one WAL record and that no other WAL records will be generated in the process, because for example a particular transaction could always be the one that has to e

pgsql: pgstat: drop subscription stats without slot as well, fix commen

2022-07-06 Thread Andres Freund
pgstat: drop subscription stats without slot as well, fix comment There's no reason anymore to only drop subscription stats if associated with a slot, now that stats drops are transactional. And since there's now no other cleanup of stats, this would lead to stats for slot-less subscriptions to ge

pgsql: pgstat: drop subscription stats regardless of slot, fix comment

2022-07-06 Thread Andres Freund
pgstat: drop subscription stats regardless of slot, fix comment There's no reason anymore to only drop subscription stats if associated with a slot, now that stats drops are transactional. Additionally, the comment referring to autovacuum cleaning up stats was clearly outdated. Author: Masahiko S

pgsql: Change internal RelFileNode references to RelFileNumber or RelFi

2022-07-06 Thread Robert Haas
Change internal RelFileNode references to RelFileNumber or RelFileLocator. We have been using the term RelFileNode to refer to either (1) the integer that is used to name the sequence of files for a certain relation within the directory set aside for that tablespace/database combination; or (2) th

pgsql: Remove LLVM_CONFIG from Makefile.global.in

2022-07-06 Thread Andres Freund
Remove LLVM_CONFIG from Makefile.global.in LLVM_CONFIG is only used inside configure. Reviewed-By: Peter Eisentraut Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/7775c748db125

pgsql: Tiny capitalization adjustment in pkg-config files

2022-07-06 Thread Peter Eisentraut
Tiny capitalization adjustment in pkg-config files This makes the output match that produced by meson (and also matches other packages and pkg-config's own documentation better). Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/eb7a9cd459736f29c5d091cf1bf59842ec9c717