pgsql: Fix ./configure checks with __cpuidex() and __cpuid()

2025-07-29 Thread Michael Paquier
Fix ./configure checks with __cpuidex() and __cpuid() The configure checks used two incorrect functions when checking the presence of some routines in an environment: - __get_cpuidex() for the check of __cpuidex(). - __get_cpuid() for the check of __cpuid(). This means that Postgres has never been

pgsql: Fix ./configure checks with __cpuidex() and __cpuid()

2025-07-29 Thread Michael Paquier
Fix ./configure checks with __cpuidex() and __cpuid() The configure checks used two incorrect functions when checking the presence of some routines in an environment: - __get_cpuidex() for the check of __cpuidex(). - __get_cpuid() for the check of __cpuid(). This means that Postgres has never been

pgsql: Fix ./configure checks with __cpuidex() and __cpuid()

2025-07-29 Thread Michael Paquier
Fix ./configure checks with __cpuidex() and __cpuid() The configure checks used two incorrect functions when checking the presence of some routines in an environment: - __get_cpuidex() for the check of __cpuidex(). - __get_cpuid() for the check of __cpuid(). This means that Postgres has never been

pgsql: Fix ./configure checks with __cpuidex() and __cpuid()

2025-07-29 Thread Michael Paquier
Fix ./configure checks with __cpuidex() and __cpuid() The configure checks used two incorrect functions when checking the presence of some routines in an environment: - __get_cpuidex() for the check of __cpuidex(). - __get_cpuid() for the check of __cpuid(). This means that Postgres has never been

pgsql: Fix ./configure checks with __cpuidex() and __cpuid()

2025-07-29 Thread Michael Paquier
Fix ./configure checks with __cpuidex() and __cpuid() The configure checks used two incorrect functions when checking the presence of some routines in an environment: - __get_cpuidex() for the check of __cpuidex(). - __get_cpuid() for the check of __cpuid(). This means that Postgres has never been

pgsql: Fix ./configure checks with __cpuidex() and __cpuid()

2025-07-29 Thread Michael Paquier
Fix ./configure checks with __cpuidex() and __cpuid() The configure checks used two incorrect functions when checking the presence of some routines in an environment: - __get_cpuidex() for the check of __cpuidex(). - __get_cpuid() for the check of __cpuid(). This means that Postgres has never been

pgsql: Fix ./configure checks with __cpuidex() and __cpuid()

2025-07-29 Thread Michael Paquier
Fix ./configure checks with __cpuidex() and __cpuid() The configure checks used two incorrect functions when checking the presence of some routines in an environment: - __get_cpuidex() for the check of __cpuidex(). - __get_cpuid() for the check of __cpuid(). This means that Postgres has never been

pgsql: doc PG 18 relnotes: update to current

2025-07-29 Thread Bruce Momjian
doc PG 18 relnotes: update to current Backpatch-through: 18 only Branch -- REL_18_STABLE Details --- https://git.postgresql.org/pg/commitdiff/a60691eb201dfaa8a2c3aec8815d08ed3371aae7 Modified Files -- doc/src/sgml/release-18.sgml | 25 + 1 file change

pgsql: Handle cancel requests with PID 0 gracefully

2025-07-29 Thread Heikki Linnakangas
Handle cancel requests with PID 0 gracefully If the client sent a query cancel request with backend PID 0, it tripped an assertion. With assertions disabled, you got this in the log instead: LOG: invalid cancel request with PID 0 LOG: wrong key in cancel request for process 0 Query can

pgsql: Handle cancel requests with PID 0 gracefully

2025-07-29 Thread Heikki Linnakangas
Handle cancel requests with PID 0 gracefully If the client sent a query cancel request with backend PID 0, it tripped an assertion. With assertions disabled, you got this in the log instead: LOG: invalid cancel request with PID 0 LOG: wrong key in cancel request for process 0 Query can

pgsql: Don't put library-supplied -L/-I switches before user-supplied o

2025-07-29 Thread Tom Lane
Don't put library-supplied -L/-I switches before user-supplied ones. For many optional libraries, we extract the -L and -l switches needed to link the library from a helper program such as llvm-config. In some cases we put the resulting -L switches into LDFLAGS ahead of -L switches specified via

pgsql: Don't put library-supplied -L/-I switches before user-supplied o

2025-07-29 Thread Tom Lane
Don't put library-supplied -L/-I switches before user-supplied ones. For many optional libraries, we extract the -L and -l switches needed to link the library from a helper program such as llvm-config. In some cases we put the resulting -L switches into LDFLAGS ahead of -L switches specified via

pgsql: Don't put library-supplied -L/-I switches before user-supplied o

2025-07-29 Thread Tom Lane
Don't put library-supplied -L/-I switches before user-supplied ones. For many optional libraries, we extract the -L and -l switches needed to link the library from a helper program such as llvm-config. In some cases we put the resulting -L switches into LDFLAGS ahead of -L switches specified via

pgsql: Don't put library-supplied -L/-I switches before user-supplied o

2025-07-29 Thread Tom Lane
Don't put library-supplied -L/-I switches before user-supplied ones. For many optional libraries, we extract the -L and -l switches needed to link the library from a helper program such as llvm-config. In some cases we put the resulting -L switches into LDFLAGS ahead of -L switches specified via

pgsql: Don't put library-supplied -L/-I switches before user-supplied o

2025-07-29 Thread Tom Lane
Don't put library-supplied -L/-I switches before user-supplied ones. For many optional libraries, we extract the -L and -l switches needed to link the library from a helper program such as llvm-config. In some cases we put the resulting -L switches into LDFLAGS ahead of -L switches specified via

pgsql: Don't put library-supplied -L/-I switches before user-supplied o

2025-07-29 Thread Tom Lane
Don't put library-supplied -L/-I switches before user-supplied ones. For many optional libraries, we extract the -L and -l switches needed to link the library from a helper program such as llvm-config. In some cases we put the resulting -L switches into LDFLAGS ahead of -L switches specified via

pgsql: Don't put library-supplied -L/-I switches before user-supplied o

2025-07-29 Thread Tom Lane
Don't put library-supplied -L/-I switches before user-supplied ones. For many optional libraries, we extract the -L and -l switches needed to link the library from a helper program such as llvm-config. In some cases we put the resulting -L switches into LDFLAGS ahead of -L switches specified via

pgsql: Update comment

2025-07-29 Thread Peter Eisentraut
Update comment The code being referred to was moved to a different function in commit eb8312a22a8, so update the comment accordingly. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c3019bb778b99f2541779ed23402a8f825ab Modified Files -- src/backend/

pgsql: Remove unnecessary complication around xmlParseBalancedChunkMemo

2025-07-29 Thread Tom Lane
Remove unnecessary complication around xmlParseBalancedChunkMemory. When I prepared 71c0921b6 et al yesterday, I was thinking that the logic involving explicitly freeing the node_list output was still needed to dodge leakage bugs in libxml2. But I was misremembering: we introduced that only becau

pgsql: Remove unnecessary complication around xmlParseBalancedChunkMemo

2025-07-29 Thread Tom Lane
Remove unnecessary complication around xmlParseBalancedChunkMemory. When I prepared 71c0921b6 et al yesterday, I was thinking that the logic involving explicitly freeing the node_list output was still needed to dodge leakage bugs in libxml2. But I was misremembering: we introduced that only becau

pgsql: Remove unnecessary complication around xmlParseBalancedChunkMemo

2025-07-29 Thread Tom Lane
Remove unnecessary complication around xmlParseBalancedChunkMemory. When I prepared 71c0921b6 et al yesterday, I was thinking that the logic involving explicitly freeing the node_list output was still needed to dodge leakage bugs in libxml2. But I was misremembering: we introduced that only becau

pgsql: Remove unnecessary complication around xmlParseBalancedChunkMemo

2025-07-29 Thread Tom Lane
Remove unnecessary complication around xmlParseBalancedChunkMemory. When I prepared 71c0921b6 et al yesterday, I was thinking that the logic involving explicitly freeing the node_list output was still needed to dodge leakage bugs in libxml2. But I was misremembering: we introduced that only becau

pgsql: Remove unnecessary complication around xmlParseBalancedChunkMemo

2025-07-29 Thread Tom Lane
Remove unnecessary complication around xmlParseBalancedChunkMemory. When I prepared 71c0921b6 et al yesterday, I was thinking that the logic involving explicitly freeing the node_list output was still needed to dodge leakage bugs in libxml2. But I was misremembering: we introduced that only becau

pgsql: Remove unnecessary complication around xmlParseBalancedChunkMemo

2025-07-29 Thread Tom Lane
Remove unnecessary complication around xmlParseBalancedChunkMemory. When I prepared 71c0921b6 et al yesterday, I was thinking that the logic involving explicitly freeing the node_list output was still needed to dodge leakage bugs in libxml2. But I was misremembering: we introduced that only becau

pgsql: Remove unnecessary complication around xmlParseBalancedChunkMemo

2025-07-29 Thread Tom Lane
Remove unnecessary complication around xmlParseBalancedChunkMemory. When I prepared 71c0921b6 et al yesterday, I was thinking that the logic involving explicitly freeing the node_list output was still needed to dodge leakage bugs in libxml2. But I was misremembering: we introduced that only becau

pgsql: Add commit 1d1612aec7 to .git-blame-ignore-revs.

2025-07-29 Thread Nathan Bossart
Add commit 1d1612aec7 to .git-blame-ignore-revs. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0f3a26feddae7ae403c90742095ff4626d7e5617 Modified Files -- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+)

pgsql: Display Memoize planner estimates in EXPLAIN

2025-07-29 Thread David Rowley
Display Memoize planner estimates in EXPLAIN There've been a few complaints that it can be overly difficult to figure out why the planner picked a Memoize plan. To help address that, here we adjust the EXPLAIN output to display the following additional details: 1) The estimated number of cache e

pgsql: Split up pgfdw_report_error so that we can mark it pg_noreturn.

2025-07-29 Thread Tom Lane
Split up pgfdw_report_error so that we can mark it pg_noreturn. pgfdw_report_error has the same design fault as elog/ereport do, namely that it might or might not return depending on elevel. While those functions are too widely used to redesign, there are only about 30 call sites for pgfdw_report_

pgsql: Suppress uninitialized-variable warning.

2025-07-29 Thread Tom Lane
Suppress uninitialized-variable warning. In the wake of commit 80aa9848b, a few compilers think that postgresAcquireSampleRowsFunc's "reltuples" might be used uninitialized. The logic is visibly correct, both before and after that change; presumably what happened here is that the previous presenc

Re: pgsql: Remove misleading hint for "unexpected data beyond EOF" error.

2025-07-29 Thread Robert Haas
On Mon, Jul 28, 2025 at 11:30 PM David Rowley wrote: > On Tue, 29 Jul 2025 at 03:17, Robert Haas wrote: > > Remove misleading hint for "unexpected data beyond EOF" error. > > Just FYI, koel is failing the pgindent test from this: Oops. Fixed, I hope. -- Robert Haas EDB: http://www.enterprisedb

pgsql: Run pgindent.

2025-07-29 Thread Robert Haas
Run pgindent. Per buildfarm member koel, Nathan Bossart, and David Rowley. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1d1612aec7688139e1a5506df1366b4b6a69605d Modified Files -- src/backend/storage/buffer/bufmgr.c | 6 +++--- 1 file changed, 3 insert

pgsql: Add regression test for background worker restart after crash.

2025-07-29 Thread Fujii Masao
Add regression test for background worker restart after crash. Previously, if a background worker crashed and the server restarted with restart_after_crash enabled, the worker was not restarted as expected. This issue was fixed by commit b5d084c5353, which ensures that background workers without t

pgsql: Handle timeout in PostgreSQL::Test::Cluster::is_alive()

2025-07-29 Thread Michael Paquier
Handle timeout in PostgreSQL::Test::Cluster::is_alive() This commit adds an extra --timeout=PG_TEST_TIMEOUT_DEFAULT to the call of pg_isready done in is_alive(), so as it is possible to have more leverage with the call on machines constrained on resources. By default the timeout is 180s, and it c

pgsql: Clarify documentation for the initcap function

2025-07-29 Thread Alexander Korotkov
Clarify documentation for the initcap function This commit documents differences in the definition of word separators for the initcap function between libc and ICU locale providers. Backpatch to all supported branches. Discussion: https://postgr.es/m/804cc10ef95d4d3b298e76b181fd9437%40postgrespr

pgsql: Clarify documentation for the initcap function

2025-07-29 Thread Alexander Korotkov
Clarify documentation for the initcap function This commit documents differences in the definition of word separators for the initcap function between libc and ICU locale providers. Backpatch to all supported branches. Discussion: https://postgr.es/m/804cc10ef95d4d3b298e76b181fd9437%40postgrespr

pgsql: Clarify documentation for the initcap function

2025-07-29 Thread Alexander Korotkov
Clarify documentation for the initcap function This commit documents differences in the definition of word separators for the initcap function between libc and ICU locale providers. Backpatch to all supported branches. Discussion: https://postgr.es/m/804cc10ef95d4d3b298e76b181fd9437%40postgrespr

pgsql: Clarify documentation for the initcap function

2025-07-29 Thread Alexander Korotkov
Clarify documentation for the initcap function This commit documents differences in the definition of word separators for the initcap function between libc and ICU locale providers. Backpatch to all supported branches. Discussion: https://postgr.es/m/804cc10ef95d4d3b298e76b181fd9437%40postgrespr

pgsql: Clarify documentation for the initcap function

2025-07-29 Thread Alexander Korotkov
Clarify documentation for the initcap function This commit documents differences in the definition of word separators for the initcap function between libc and ICU locale providers. Backpatch to all supported branches. Discussion: https://postgr.es/m/804cc10ef95d4d3b298e76b181fd9437%40postgrespr

pgsql: Clarify documentation for the initcap function

2025-07-29 Thread Alexander Korotkov
Clarify documentation for the initcap function This commit documents differences in the definition of word separators for the initcap function between libc and ICU locale providers. Backpatch to all supported branches. Discussion: https://postgr.es/m/804cc10ef95d4d3b298e76b181fd9437%40postgrespr

pgsql: Clarify documentation for the initcap function

2025-07-29 Thread Alexander Korotkov
Clarify documentation for the initcap function This commit documents differences in the definition of word separators for the initcap function between libc and ICU locale providers. Backpatch to all supported branches. Discussion: https://postgr.es/m/804cc10ef95d4d3b298e76b181fd9437%40postgrespr