pgsql: meson: ci: Convert some tasks to use meson

2022-09-21 Thread Andres Freund
meson: ci: Convert some tasks to use meson The Windows task is changed to use meson as there currently is no way to run all tests in the old MSVC build system (only ninja is covered for now, we don't have enough CI resources to test msbuild as well). To maintain autoconf coverage, the Linux task

pgsql: meson: Add initial version of meson based build system

2022-09-21 Thread Andres Freund
meson: Add initial version of meson based build system Autoconf is showing its age, fewer and fewer contributors know how to wrangle it. Recursive make has a lot of hard to resolve dependency issues and slow incremental rebuilds. Our home-grown MSVC build system is hard to maintain for developers

pgsql: Clear ps display of startup process at the end of recovery

2022-09-21 Thread Michael Paquier
Clear ps display of startup process at the end of recovery If the ps display is not cleared at this point, the process could continue displaying "recovering NNN" even if handling end-of-recovery steps. df9274a has tackled that by providing some information with the end-of-recovery checkpoint but

pgsql: Clear ps display of startup process at the end of recovery

2022-09-21 Thread Michael Paquier
Clear ps display of startup process at the end of recovery If the ps display is not cleared at this point, the process could continue displaying "recovering NNN" even if handling end-of-recovery steps. df9274a has tackled that by providing some information with the end-of-recovery checkpoint but

pgsql: docs: Fix snapshot name in SET TRANSACTION docs.

2022-09-21 Thread Fujii Masao
docs: Fix snapshot name in SET TRANSACTION docs. Commit 6c2003f8a1 changed the snapshot names mentioned in SET TRANSACTION docs, however, there was one place that the commit missed updating the name. Back-patch to all supported versions. Author: Japin Li Reviewed-by: Fujii Masao Discussion: htt

pgsql: docs: Fix snapshot name in SET TRANSACTION docs.

2022-09-21 Thread Fujii Masao
docs: Fix snapshot name in SET TRANSACTION docs. Commit 6c2003f8a1 changed the snapshot names mentioned in SET TRANSACTION docs, however, there was one place that the commit missed updating the name. Back-patch to all supported versions. Author: Japin Li Reviewed-by: Fujii Masao Discussion: htt

pgsql: docs: Fix snapshot name in SET TRANSACTION docs.

2022-09-21 Thread Fujii Masao
docs: Fix snapshot name in SET TRANSACTION docs. Commit 6c2003f8a1 changed the snapshot names mentioned in SET TRANSACTION docs, however, there was one place that the commit missed updating the name. Back-patch to all supported versions. Author: Japin Li Reviewed-by: Fujii Masao Discussion: htt

pgsql: docs: Fix snapshot name in SET TRANSACTION docs.

2022-09-21 Thread Fujii Masao
docs: Fix snapshot name in SET TRANSACTION docs. Commit 6c2003f8a1 changed the snapshot names mentioned in SET TRANSACTION docs, however, there was one place that the commit missed updating the name. Back-patch to all supported versions. Author: Japin Li Reviewed-by: Fujii Masao Discussion: htt

pgsql: docs: Fix snapshot name in SET TRANSACTION docs.

2022-09-21 Thread Fujii Masao
docs: Fix snapshot name in SET TRANSACTION docs. Commit 6c2003f8a1 changed the snapshot names mentioned in SET TRANSACTION docs, however, there was one place that the commit missed updating the name. Back-patch to all supported versions. Author: Japin Li Reviewed-by: Fujii Masao Discussion: htt

pgsql: docs: Fix snapshot name in SET TRANSACTION docs.

2022-09-21 Thread Fujii Masao
docs: Fix snapshot name in SET TRANSACTION docs. Commit 6c2003f8a1 changed the snapshot names mentioned in SET TRANSACTION docs, however, there was one place that the commit missed updating the name. Back-patch to all supported versions. Author: Japin Li Reviewed-by: Fujii Masao Discussion: htt

pgsql: docs: Fix snapshot name in SET TRANSACTION docs.

2022-09-21 Thread Fujii Masao
docs: Fix snapshot name in SET TRANSACTION docs. Commit 6c2003f8a1 changed the snapshot names mentioned in SET TRANSACTION docs, however, there was one place that the commit missed updating the name. Back-patch to all supported versions. Author: Japin Li Reviewed-by: Fujii Masao Discussion: htt

pgsql: Used optimized linear search in more code paths

2022-09-21 Thread Michael Paquier
Used optimized linear search in more code paths This commit updates two code paths to use pg_lfind32() introduced by b6ef167 with TransactionId arrays: - At the end of TransactionIdIsInProgress(), when checking for the case of still running but overflowed subxids. - XidIsConcurrent(), when checkin

pgsql: psql: Improve tab-completion for MERGE.

2022-09-21 Thread Fujii Masao
psql: Improve tab-completion for MERGE. Commit 7103ebb7aa added the tab-completion for MERGE accidentally in the middle of that for LOCK TABLE. This commit fixes this issue. This also adds some tab-completion for MERGE. Back-patch to v15 where MERGE was introduced. Author: Kotaro Kawamoto, Fuji

pgsql: psql: Improve tab-completion for MERGE.

2022-09-21 Thread Fujii Masao
psql: Improve tab-completion for MERGE. Commit 7103ebb7aa added the tab-completion for MERGE accidentally in the middle of that for LOCK TABLE. This commit fixes this issue. This also adds some tab-completion for MERGE. Back-patch to v15 where MERGE was introduced. Author: Kotaro Kawamoto, Fuji

pgsql: ci: windows: set error mode to not include SEM_NOGPFAULTERRORBOX

2022-09-21 Thread Andres Freund
ci: windows: set error mode to not include SEM_NOGPFAULTERRORBOX Cirrus defaults to SetErrorMode(SEM_NOGPFAULTERRORBOX | ...). That prevents crash reporting from working unless binaries do SetErrorMode() themselves. Furthermore, it appears that either python or, more likely, the C runtime has a bu

pgsql: ci: windows: set error mode to not include SEM_NOGPFAULTERRORBOX

2022-09-21 Thread Andres Freund
ci: windows: set error mode to not include SEM_NOGPFAULTERRORBOX Cirrus defaults to SetErrorMode(SEM_NOGPFAULTERRORBOX | ...). That prevents crash reporting from working unless binaries do SetErrorMode() themselves. Furthermore, it appears that either python or, more likely, the C runtime has a bu

pgsql: ci: Increase requested memory size.

2022-09-21 Thread Thomas Munro
ci: Increase requested memory size. CI builds recently started failing with: "Memory size for 4.0 vCPU instance should be between 3840MiB and 26624MiB, while 2048MiB is requested." Ok then, let's ask for 4G instead of 2G. This may be due to a change in the type of instance used to work around a

pgsql: ci: Increase requested memory size.

2022-09-21 Thread Thomas Munro
ci: Increase requested memory size. CI builds recently started failing with: "Memory size for 4.0 vCPU instance should be between 3840MiB and 26624MiB, while 2048MiB is requested." Ok then, let's ask for 4G instead of 2G. This may be due to a change in the type of instance used to work around a

pgsql: Harmonize lexer adjacent function parameter names.

2022-09-21 Thread Peter Geoghegan
Harmonize lexer adjacent function parameter names. Make sure that function declarations use names that exactly match the corresponding names from function definitions for several "lexer adjacent" backend functions. These functions were missed by recent commits because they were obscured by clang-

pgsql: Fix configure's AC_CHECK_DECLS tests to work correctly with clan

2022-09-21 Thread Tom Lane
Fix configure's AC_CHECK_DECLS tests to work correctly with clang. Back-port commit 16fbac39f into 9.3 and 9.2, so that these out-of-support branches can be built with clang without wading through a pile of warnings about strlcpy and related functions. check_decls.m4 required some adaptation to wo

pgsql: Fix configure's AC_CHECK_DECLS tests to work correctly with clan

2022-09-21 Thread Tom Lane
Fix configure's AC_CHECK_DECLS tests to work correctly with clang. Back-port commit 16fbac39f into 9.3 and 9.2, so that these out-of-support branches can be built with clang without wading through a pile of warnings about strlcpy and related functions. check_decls.m4 required some adaptation to wo

pgsql: Suppress more variable-set-but-not-used warnings from clang 15.

2022-09-21 Thread Tom Lane
Suppress more variable-set-but-not-used warnings from clang 15. Mop up assorted set-but-not-used warnings in the back branches. This includes back-patching relevant fixes from commit 152c9f7b8 the rest of the way, but there are also several cases that did not appear in HEAD. Some of those we'd fi

pgsql: Suppress more variable-set-but-not-used warnings from clang 15.

2022-09-21 Thread Tom Lane
Suppress more variable-set-but-not-used warnings from clang 15. Mop up assorted set-but-not-used warnings in the back branches. This includes back-patching relevant fixes from commit 152c9f7b8 the rest of the way, but there are also several cases that did not appear in HEAD. Some of those we'd fi

pgsql: Suppress more variable-set-but-not-used warnings from clang 15.

2022-09-21 Thread Tom Lane
Suppress more variable-set-but-not-used warnings from clang 15. Mop up assorted set-but-not-used warnings in the back branches. This includes back-patching relevant fixes from commit 152c9f7b8 the rest of the way, but there are also several cases that did not appear in HEAD. Some of those we'd fi

pgsql: Suppress more variable-set-but-not-used warnings from clang 15.

2022-09-21 Thread Tom Lane
Suppress more variable-set-but-not-used warnings from clang 15. Mop up assorted set-but-not-used warnings in the back branches. This includes back-patching relevant fixes from commit 152c9f7b8 the rest of the way, but there are also several cases that did not appear in HEAD. Some of those we'd fi

pgsql: Suppress more variable-set-but-not-used warnings from clang 15.

2022-09-21 Thread Tom Lane
Suppress more variable-set-but-not-used warnings from clang 15. Mop up assorted set-but-not-used warnings in the back branches. This includes back-patching relevant fixes from commit 152c9f7b8 the rest of the way, but there are also several cases that did not appear in HEAD. Some of those we'd fi

pgsql: Suppress more variable-set-but-not-used warnings from clang 15.

2022-09-21 Thread Tom Lane
Suppress more variable-set-but-not-used warnings from clang 15. Mop up assorted set-but-not-used warnings in the back branches. This includes back-patching relevant fixes from commit 152c9f7b8 the rest of the way, but there are also several cases that did not appear in HEAD. Some of those we'd fi

pgsql: Suppress more variable-set-but-not-used warnings from clang 15.

2022-09-21 Thread Tom Lane
Suppress more variable-set-but-not-used warnings from clang 15. Mop up assorted set-but-not-used warnings in the back branches. This includes back-patching relevant fixes from commit 152c9f7b8 the rest of the way, but there are also several cases that did not appear in HEAD. Some of those we'd fi

pgsql: Suppress more variable-set-but-not-used warnings from clang 15.

2022-09-21 Thread Tom Lane
Suppress more variable-set-but-not-used warnings from clang 15. Mop up assorted set-but-not-used warnings in the back branches. This includes back-patching relevant fixes from commit 152c9f7b8 the rest of the way, but there are also several cases that did not appear in HEAD. Some of those we'd fi

pgsql: Suppress more variable-set-but-not-used warnings from clang 15.

2022-09-21 Thread Tom Lane
Suppress more variable-set-but-not-used warnings from clang 15. Mop up assorted set-but-not-used warnings in the back branches. This includes back-patching relevant fixes from commit 152c9f7b8 the rest of the way, but there are also several cases that did not appear in HEAD. Some of those we'd fi

pgsql: Suppress more variable-set-but-not-used warnings from clang 15.

2022-09-21 Thread Tom Lane
Suppress more variable-set-but-not-used warnings from clang 15. Mop up assorted set-but-not-used warnings in the back branches. This includes back-patching relevant fixes from commit 152c9f7b8 the rest of the way, but there are also several cases that did not appear in HEAD. Some of those we'd fi

pgsql: Improve ICU option handling in CREATE DATABASE

2022-09-21 Thread Peter Eisentraut
Improve ICU option handling in CREATE DATABASE We check that the ICU locale is only specified if the ICU locale provider is selected. But we did that too early. We need to wait until we load the settings of the template database, since that could also set what the locale provider is. Reported-b

pgsql: Improve ICU option handling in CREATE DATABASE

2022-09-21 Thread Peter Eisentraut
Improve ICU option handling in CREATE DATABASE We check that the ICU locale is only specified if the ICU locale provider is selected. But we did that too early. We need to wait until we load the settings of the template database, since that could also set what the locale provider is. Reported-b

pgsql: Tighten pg_get_object_address argument checking

2022-09-21 Thread Peter Eisentraut
Tighten pg_get_object_address argument checking For publication schemas (OBJECT_PUBLICATION_NAMESPACE) and user mappings (OBJECT_USER_MAPPING), pg_get_object_address() checked the array length of the second argument, but not of the first argument. If the first argument was too long, it would just

pgsql: Tighten pg_get_object_address argument checking

2022-09-21 Thread Peter Eisentraut
Tighten pg_get_object_address argument checking For publication schemas (OBJECT_PUBLICATION_NAMESPACE) and user mappings (OBJECT_USER_MAPPING), pg_get_object_address() checked the array length of the second argument, but not of the first argument. If the first argument was too long, it would just

pgsql: Improve some GUC description strings

2022-09-21 Thread Alvaro Herrera
Improve some GUC description strings It is not our usual style to use "we" in messages. Also, remove some noise words. Backpatch to 15. Noted by Kyotaro Horiguchi. Discussion: https://postgr.es/m/[email protected] Branch -- master Details ---

pgsql: Improve some GUC description strings

2022-09-21 Thread Alvaro Herrera
Improve some GUC description strings It is not our usual style to use "we" in messages. Also, remove some noise words. Backpatch to 15. Noted by Kyotaro Horiguchi. Discussion: https://postgr.es/m/[email protected] Branch -- REL_15_STABLE Details -