pgsql: pg_regress: Disable autoruns for cmd.exe on Windows

2024-01-11 Thread Michael Paquier
pg_regress: Disable autoruns for cmd.exe on Windows This is similar to 9886744a361b, to prevent the execution of other programs due to autorun configurations which could influence the postmaster startup. This was originally applied on HEAD as of 83c75ac7fb69 without a backpatch, but the patch has

pgsql: pg_regress: Disable autoruns for cmd.exe on Windows

2024-01-11 Thread Michael Paquier
pg_regress: Disable autoruns for cmd.exe on Windows This is similar to 9886744a361b, to prevent the execution of other programs due to autorun configurations which could influence the postmaster startup. This was originally applied on HEAD as of 83c75ac7fb69 without a backpatch, but the patch has

pgsql: pg_regress: Disable autoruns for cmd.exe on Windows

2024-01-11 Thread Michael Paquier
pg_regress: Disable autoruns for cmd.exe on Windows This is similar to 9886744a361b, to prevent the execution of other programs due to autorun configurations which could influence the postmaster startup. This was originally applied on HEAD as of 83c75ac7fb69 without a backpatch, but the patch has

pgsql: pg_regress: Disable autoruns for cmd.exe on Windows

2024-01-11 Thread Michael Paquier
pg_regress: Disable autoruns for cmd.exe on Windows This is similar to 9886744a361b, to prevent the execution of other programs due to autorun configurations which could influence the postmaster startup. This was originally applied on HEAD as of 83c75ac7fb69 without a backpatch, but the patch has

pgsql: pg_regress: Disable autoruns for cmd.exe on Windows

2024-01-11 Thread Michael Paquier
pg_regress: Disable autoruns for cmd.exe on Windows This is similar to 9886744a361b, to prevent the execution of other programs due to autorun configurations which could influence the postmaster startup. This was originally applied on HEAD as of 83c75ac7fb69 without a backpatch, but the patch has

pgsql: pg_ctl: Disable autoruns for cmd.exe on Windows

2024-01-11 Thread Michael Paquier
pg_ctl: Disable autoruns for cmd.exe on Windows On Windows, cmd.exe is used to launch the postmaster process to ease its redirection setup. However, cmd.exe may execute other programs at startup due to autorun configurations, which could influence the postmaster startup. This patch adds /D flag

pgsql: pg_ctl: Disable autoruns for cmd.exe on Windows

2024-01-11 Thread Michael Paquier
pg_ctl: Disable autoruns for cmd.exe on Windows On Windows, cmd.exe is used to launch the postmaster process to ease its redirection setup. However, cmd.exe may execute other programs at startup due to autorun configurations, which could influence the postmaster startup. This patch adds /D flag

pgsql: pg_ctl: Disable autoruns for cmd.exe on Windows

2024-01-11 Thread Michael Paquier
pg_ctl: Disable autoruns for cmd.exe on Windows On Windows, cmd.exe is used to launch the postmaster process to ease its redirection setup. However, cmd.exe may execute other programs at startup due to autorun configurations, which could influence the postmaster startup. This patch adds /D flag

pgsql: pg_ctl: Disable autoruns for cmd.exe on Windows

2024-01-11 Thread Michael Paquier
pg_ctl: Disable autoruns for cmd.exe on Windows On Windows, cmd.exe is used to launch the postmaster process to ease its redirection setup. However, cmd.exe may execute other programs at startup due to autorun configurations, which could influence the postmaster startup. This patch adds /D flag

pgsql: pg_ctl: Disable autoruns for cmd.exe on Windows

2024-01-11 Thread Michael Paquier
pg_ctl: Disable autoruns for cmd.exe on Windows On Windows, cmd.exe is used to launch the postmaster process to ease its redirection setup. However, cmd.exe may execute other programs at startup due to autorun configurations, which could influence the postmaster startup. This patch adds /D flag

pgsql: Fix pg_walsummary's .gitignore

2024-01-11 Thread Michael Paquier
Fix pg_walsummary's .gitignore It missed a entry for tmp_check/ generated by the tests. While on it, append a slash at the beginning of "pg_walsummary" to restrict its check to the current directory, like anywhere else. Oversights in ee1bfd168390. Branch -- master Details --- https://g

pgsql: Refactor code checking for file existence

2024-01-11 Thread Michael Paquier
Refactor code checking for file existence jit.c and dfgr.c had a copy of the same code to check if a file exists or not, with a twist: jit.c did not check for EACCES when failing the stat() call for the path whose existence is tested. This refactored routine will be used by an upcoming patch. Re

Re: pgsql: Add support event triggers on authenticated login

2024-01-11 Thread Tom Lane
Bharath Rupireddy writes: > Hi, I'm seeing a compiler warning with CFLAGS -O3 but not with -O2. > In file included from dbcommands.c:20: > dbcommands.c: In function ‘createdb’: > ../../../src/include/postgres.h:104:16: warning: ‘src_hasloginevt’ may > be used uninitialized in this function [-Wmay

Re: pgsql: Add support event triggers on authenticated login

2024-01-11 Thread Bharath Rupireddy
On Mon, Oct 16, 2023 at 5:49 AM Alexander Korotkov wrote: > > Add support event triggers on authenticated login Hi, I'm seeing a compiler warning with CFLAGS -O3 but not with -O2. In file included from dbcommands.c:20: dbcommands.c: In function ‘createdb’: ../../../src/include/postgres.h:104:16:

pgsql: Rework how logirep launchers are stopped during pg_upgrade

2024-01-11 Thread Michael Paquier
Rework how logirep launchers are stopped during pg_upgrade This is a rework of 7021d3b17664, where we relied on forcing max_logical_replication_workers to 0 in the postgres command. This commit now prevents logical replication launchers to start using -b and a backend-side check based on IsBinary

pgsql: Fix some inconsistent whitespace in Perl file

2024-01-11 Thread Peter Eisentraut
Fix some inconsistent whitespace in Perl file Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/7786af4d74182ddd32e00f694bba741ee5d33efa Modified Files -- src/test/modules/test_pg_dump/t/001_base.pl | 64 ++--- 1 file changed, 32 ins

pgsql: Fix incorrect format placeholder

2024-01-11 Thread Peter Eisentraut
Fix incorrect format placeholder Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/35bc310c04a477376778f437a56f0fcfb504c9c3 Modified Files -- src/bin/pg_upgrade/info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Cleanup for unicode-update build target and test.

2024-01-11 Thread Jeff Davis
Cleanup for unicode-update build target and test. In preparation for adding more Unicode tables. Discussion: https://postgr.es/m/[email protected] Reviewed-by: Jeremy Schneider Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/cf64d

pgsql: Allow subquery pullup to wrap a PlaceHolderVar in another one.

2024-01-11 Thread Tom Lane
Allow subquery pullup to wrap a PlaceHolderVar in another one. The code for wrapping subquery output expressions in PlaceHolderVars believed that if the expression already was a PlaceHolderVar, it was never necessary to wrap that in another one. That's wrong if the expression is underneath an out

pgsql: Allow subquery pullup to wrap a PlaceHolderVar in another one.

2024-01-11 Thread Tom Lane
Allow subquery pullup to wrap a PlaceHolderVar in another one. The code for wrapping subquery output expressions in PlaceHolderVars believed that if the expression already was a PlaceHolderVar, it was never necessary to wrap that in another one. That's wrong if the expression is underneath an out

pgsql: Allow subquery pullup to wrap a PlaceHolderVar in another one.

2024-01-11 Thread Tom Lane
Allow subquery pullup to wrap a PlaceHolderVar in another one. The code for wrapping subquery output expressions in PlaceHolderVars believed that if the expression already was a PlaceHolderVar, it was never necessary to wrap that in another one. That's wrong if the expression is underneath an out

pgsql: Allow subquery pullup to wrap a PlaceHolderVar in another one.

2024-01-11 Thread Tom Lane
Allow subquery pullup to wrap a PlaceHolderVar in another one. The code for wrapping subquery output expressions in PlaceHolderVars believed that if the expression already was a PlaceHolderVar, it was never necessary to wrap that in another one. That's wrong if the expression is underneath an out

pgsql: Allow subquery pullup to wrap a PlaceHolderVar in another one.

2024-01-11 Thread Tom Lane
Allow subquery pullup to wrap a PlaceHolderVar in another one. The code for wrapping subquery output expressions in PlaceHolderVars believed that if the expression already was a PlaceHolderVar, it was never necessary to wrap that in another one. That's wrong if the expression is underneath an out

pgsql: Allow subquery pullup to wrap a PlaceHolderVar in another one.

2024-01-11 Thread Tom Lane
Allow subquery pullup to wrap a PlaceHolderVar in another one. The code for wrapping subquery output expressions in PlaceHolderVars believed that if the expression already was a PlaceHolderVar, it was never necessary to wrap that in another one. That's wrong if the expression is underneath an out

pgsql: Try to fix pg_walsummary buildfarm failures.

2024-01-11 Thread Robert Haas
Try to fix pg_walsummary buildfarm failures. Apparently the new tuple isn't guaranteed to end up at the end of the relation, so make the test not depend on that happening. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a7097ca630a25dd2248229f21ebce4968d85d10a Modi

pgsql: Remove hastup from LVPagePruneState.

2024-01-11 Thread Robert Haas
Remove hastup from LVPagePruneState. Instead, just have lazy_scan_prune() and lazy_scan_noprune() update LVRelState->nonempty_pages directly. This makes the two functions more similar and also removes makes lazy_scan_noprune need one fewer output parameters. Melanie Plageman, reviewed by Andres F

pgsql: Reindent after commit d9ef650fca7bc574586f4171cd929cfd5240326e.

2024-01-11 Thread Robert Haas
Reindent after commit d9ef650fca7bc574586f4171cd929cfd5240326e. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5faffa0434b484772782ff4763c0b2080222dde0 Modified Files -- src/backend/postmaster/walsummarizer.c | 2 +- 1 file changed, 1 insertion(+), 1 del

pgsql: Repair various defects in dc212340058b4e7ecfc5a7a81ec50e7a207bf2

2024-01-11 Thread Robert Haas
Repair various defects in dc212340058b4e7ecfc5a7a81ec50e7a207bf288. pg_combinebackup had various problems: * strncpy was used in various places where strlcpy should be used instead, to avoid any possibility of the result not being \0-terminated. * scan_for_existing_tablespaces() failed to clo

pgsql: Add new pg_walsummary tool.

2024-01-11 Thread Robert Haas
Add new pg_walsummary tool. This can dump the contents of the WAL summary files found in pg_wal/summaries. Normally, this shouldn't really be something anyone needs to do, but it may be needed for debugging problems with incremental backup, or could possibly be useful to external tools. Discussio

pgsql: Add new function pg_get_wal_summarizer_state().

2024-01-11 Thread Robert Haas
Add new function pg_get_wal_summarizer_state(). This makes it possible to access information about the progress of WAL summarization from SQL. The previously-added functions pg_available_wal_summaries() and pg_wal_summary_contents() only examine on-disk state, but this function exposes information

pgsql: Clarify which xml tools are missing in meson error message

2024-01-11 Thread Magnus Hagander
Clarify which xml tools are missing in meson error message Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/544bcb5a5e778e8ef8d784de611c5f85bc33433c Modified Files -- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix omission in partitioning limitation documentation

2024-01-11 Thread Magnus Hagander
Fix omission in partitioning limitation documentation UNIQUE and PRIMARY KEY constraints can be created on ONLY the partitioned table. We already had an example demonstrating that, but forgot to mention it in the documentation of the limits of partitioning. Author: Laurenz Albe Reviewed-By: shih

pgsql: Fix omission in partitioning limitation documentation

2024-01-11 Thread Magnus Hagander
Fix omission in partitioning limitation documentation UNIQUE and PRIMARY KEY constraints can be created on ONLY the partitioned table. We already had an example demonstrating that, but forgot to mention it in the documentation of the limits of partitioning. Author: Laurenz Albe Reviewed-By: shih

pgsql: Fix omission in partitioning limitation documentation

2024-01-11 Thread Magnus Hagander
Fix omission in partitioning limitation documentation UNIQUE and PRIMARY KEY constraints can be created on ONLY the partitioned table. We already had an example demonstrating that, but forgot to mention it in the documentation of the limits of partitioning. Author: Laurenz Albe Reviewed-By: shih

pgsql: Fix omission in partitioning limitation documentation

2024-01-11 Thread Magnus Hagander
Fix omission in partitioning limitation documentation UNIQUE and PRIMARY KEY constraints can be created on ONLY the partitioned table. We already had an example demonstrating that, but forgot to mention it in the documentation of the limits of partitioning. Author: Laurenz Albe Reviewed-By: shih

pgsql: Fix omission in partitioning limitation documentation

2024-01-11 Thread Magnus Hagander
Fix omission in partitioning limitation documentation UNIQUE and PRIMARY KEY constraints can be created on ONLY the partitioned table. We already had an example demonstrating that, but forgot to mention it in the documentation of the limits of partitioning. Author: Laurenz Albe Reviewed-By: shih

pgsql: Fix omission in partitioning limitation documentation

2024-01-11 Thread Magnus Hagander
Fix omission in partitioning limitation documentation UNIQUE and PRIMARY KEY constraints can be created on ONLY the partitioned table. We already had an example demonstrating that, but forgot to mention it in the documentation of the limits of partitioning. Author: Laurenz Albe Reviewed-By: shih