pgsql: headerscheck: Use ICU_CFLAGS

2025-08-29 Thread Peter Eisentraut
headerscheck: Use ICU_CFLAGS Otherwise, headerscheck will fail if the ICU headers are in a location not reached by the normal CFLAGS/CPPFLAGS: ../src/include/utils/pg_locale.h:21:10: fatal error: unicode/ucol.h: No such file or directory Reviewed-by: Tom Lane Discussion: https://www.postgresq

pgsql: headerscheck: Ignore Windows-specific header

2025-08-29 Thread Peter Eisentraut
headerscheck: Ignore Windows-specific header Ignore src/include/port/win32/sys/resource.h. At least on macOS, including this results in warnings and errors because of duplication with system headers: ../src/include/port/win32/sys/resource.h:10:9: warning: 'RUSAGE_CHILDREN' redefined ../src/incl

pgsql: headerscheck: Document that --with-llvm is required

2025-08-29 Thread Peter Eisentraut
headerscheck: Document that --with-llvm is required We already documented that other --with-* options are required for a successful run. It turns out --with-llvm is also required. Suggested-by: Tom Lane Discussion: https://www.postgresql.org/message-id/flat/1127775.1754417387%40sss.pgh.pa.us

pgsql: doc PG 18 relnotes: Add migration note about tsearch

2025-08-29 Thread Peter Eisentraut
doc PG 18 relnotes: Add migration note about tsearch Document the small migration hazard introduced in commit fb1a18810f0, as suggested there. Reviewed-by: Daniel Verite Reviewed-by: Heikki Linnakangas Discussion: https://www.postgresql.org/message-id/flat/653f3b84-fc87-45a7-9a0c-bfb4fcab3e7d%

pgsql: pg_dump: Fix compression API errorhandling

2025-08-29 Thread Daniel Gustafsson
pg_dump: Fix compression API errorhandling Compression in pg_dump is abstracted using an API with multiple implementations which can be selected at runtime by the user. The API and its implementations have evolved over time, notable commits include bf9aa490db, e9960732a9, 84adc8e20, and 0da243fed.

pgsql: doc PG 18 relnotes: update to current

2025-08-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/e1dacaac3b9f95b10c24726dee4a15d817ca04e4 Modified Files -- doc/src/sgml/release-18.sgml | 16 +--- 1 file changed, 9 inse

pgsql: pg_dump: Fix compression API errorhandling

2025-08-29 Thread Daniel Gustafsson
pg_dump: Fix compression API errorhandling Compression in pg_dump is abstracted using an API with multiple implementations which can be selected at runtime by the user. The API and its implementations have evolved over time, notable commits include bf9aa490db, e9960732a9, 84adc8e20, and 0da243fed.

pgsql: Provide error context when an error is thrown within WaitOnLock(

2025-08-29 Thread Tom Lane
Provide error context when an error is thrown within WaitOnLock(). Show the requested lock level and the object being waited on, in the same format we use for deadlock reports and similar errors. This is particularly helpful for debugging lock-timeout errors, since otherwise the user has very litt

pgsql: Fix possible use after free in expand_partitioned_rtentry()

2025-08-29 Thread David Rowley
Fix possible use after free in expand_partitioned_rtentry() It's possible that if the only live partition is concurrently dropped and try_table_open() fails, that the bms_del_member() will pfree the live_parts Bitmapset. Since the bms_del_member() call does not assign the result back to the live_

pgsql: Remove unused parameter from ProcessSlotSyncInterrupts().

2025-08-29 Thread Nathan Bossart
Remove unused parameter from ProcessSlotSyncInterrupts(). Oversight in commit 93db6cbda0. Author: ChangAo Chen Discussion: https://postgr.es/m/tencent_7B42BBE8D0A5C28DDAB91436192CBCCB8307%40qq.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6fbd7b93c615f34df6

pgsql: CREATE STATISTICS: improve misleading error message

2025-08-29 Thread Álvaro Herrera
CREATE STATISTICS: improve misleading error message I think the error message for a different condition was inadvertently copied. This problem seems to have been introduced by commit a4d75c86bf15. Author: Álvaro Herrera Reported-by: jian he Reviewed-by: Tom Lane Backpatch-through: 14 Discussi

pgsql: Fix possible use after free in expand_partitioned_rtentry()

2025-08-29 Thread David Rowley
Fix possible use after free in expand_partitioned_rtentry() It's possible that if the only live partition is concurrently dropped and try_table_open() fails, that the bms_del_member() will pfree the live_parts Bitmapset. Since the bms_del_member() call does not assign the result back to the live_

pgsql: Fix possible use after free in expand_partitioned_rtentry()

2025-08-29 Thread David Rowley
Fix possible use after free in expand_partitioned_rtentry() It's possible that if the only live partition is concurrently dropped and try_table_open() fails, that the bms_del_member() will pfree the live_parts Bitmapset. Since the bms_del_member() call does not assign the result back to the live_

pgsql: Fix possible use after free in expand_partitioned_rtentry()

2025-08-29 Thread David Rowley
Fix possible use after free in expand_partitioned_rtentry() It's possible that if the only live partition is concurrently dropped and try_table_open() fails, that the bms_del_member() will pfree the live_parts Bitmapset. Since the bms_del_member() call does not assign the result back to the live_

pgsql: CREATE STATISTICS: improve misleading error message

2025-08-29 Thread Álvaro Herrera
CREATE STATISTICS: improve misleading error message I think the error message for a different condition was inadvertently copied. This problem seems to have been introduced by commit a4d75c86bf15. Author: Álvaro Herrera Reported-by: jian he Reviewed-by: Tom Lane Backpatch-through: 14 Discussi

pgsql: Fix possible use after free in expand_partitioned_rtentry()

2025-08-29 Thread David Rowley
Fix possible use after free in expand_partitioned_rtentry() It's possible that if the only live partition is concurrently dropped and try_table_open() fails, that the bms_del_member() will pfree the live_parts Bitmapset. Since the bms_del_member() call does not assign the result back to the live_

pgsql: Fix .gitignore for src/interfaces/libpq-oauth.

2025-08-29 Thread Tom Lane
Fix .gitignore for src/interfaces/libpq-oauth. This missed files created when running the oauth tests. Branch -- REL_18_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0c97c72f3f4a6b7daa7873c7ef8e432661f4e070 Modified Files -- src/interfaces/libpq-oauth/.gitignor

pgsql: Make LWLockCounter a global variable.

2025-08-29 Thread Nathan Bossart
Make LWLockCounter a global variable. Using the LWLockCounter requires first calculating its address in shared memory like this: LWLockCounter = (int *) ((char *) MainLWLockArray - sizeof(int)); Commit 82e861fbe1 started this trend in order to fix EXEC_BACKEND builds, but it could also b

pgsql: Fix typo in isolation test spec

2025-08-29 Thread Daniel Gustafsson
Fix typo in isolation test spec Replace 'committs' with 'commits'. Author: Chao Li Reviewed-by: Ashutosh Bapat Discussion: https://postgr.es/m/CAEoWx2=beskfxsz9jqw+1ncgtazkuj2wexspm1_epgzhs0b...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5d7f

pgsql: Silence -Wmissing-variable-declarations in headerscheck.

2025-08-29 Thread Tom Lane
Silence -Wmissing-variable-declarations in headerscheck. Newer gcc versions will emit warnings about missing extern declarations if certain header files are compiled by themselves. Add the "extern" declarations needed to quiet that. Author: Tom Lane Reviewed-by: Peter Eisentraut Discussion: htt

pgsql: Fix .gitignore for src/interfaces/libpq-oauth.

2025-08-29 Thread Tom Lane
Fix .gitignore for src/interfaces/libpq-oauth. This missed files created when running the oauth tests. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/66fa3b5eef6e4764a3beb097ecc9e04b6d956bc9 Modified Files -- src/interfaces/libpq-oauth/.gitignore | 3 +

pgsql: pg_dump: Fix compression API errorhandling

2025-08-29 Thread Daniel Gustafsson
pg_dump: Fix compression API errorhandling Compression in pg_dump is abstracted using an API with multiple implementations which can be selected at runtime by the user. The API and its implementations have evolved over time, notable commits include bf9aa490db, e9960732a9, 84adc8e20, and 0da243fed.

pgsql: pg_dump: Fix compression API errorhandling

2025-08-29 Thread Daniel Gustafsson
pg_dump: Fix compression API errorhandling Compression in pg_dump is abstracted using an API with multiple implementations which can be selected at runtime by the user. The API and its implementations have evolved over time, notable commits include bf9aa490db, e9960732a9, 84adc8e20, and 0da243fed.

pgsql: Prepare DSM registry for upcoming changes to LWLock tranche name

2025-08-29 Thread Nathan Bossart
Prepare DSM registry for upcoming changes to LWLock tranche names. A proposed patch would place a limit of NAMEDATALEN-1 (i.e., 63) bytes on the names of dynamically-allocated LWLock tranches, but GetNamedDSA() and GetNamedDSHash() may register tranches with longer names. This commit lowers the m

pgsql: CREATE STATISTICS: improve misleading error message

2025-08-29 Thread Álvaro Herrera
CREATE STATISTICS: improve misleading error message I think the error message for a different condition was inadvertently copied. This problem seems to have been introduced by commit a4d75c86bf15. Author: Álvaro Herrera Reported-by: jian he Reviewed-by: Tom Lane Backpatch-through: 14 Discussi

pgsql: CREATE STATISTICS: improve misleading error message

2025-08-29 Thread Álvaro Herrera
CREATE STATISTICS: improve misleading error message I think the error message for a different condition was inadvertently copied. This problem seems to have been introduced by commit a4d75c86bf15. Author: Álvaro Herrera Reported-by: jian he Reviewed-by: Tom Lane Backpatch-through: 14 Discussi

pgsql: CREATE STATISTICS: improve misleading error message

2025-08-29 Thread Álvaro Herrera
CREATE STATISTICS: improve misleading error message I think the error message for a different condition was inadvertently copied. This problem seems to have been introduced by commit a4d75c86bf15. Author: Álvaro Herrera Reported-by: jian he Reviewed-by: Tom Lane Backpatch-through: 14 Discussi

pgsql: CREATE STATISTICS: improve misleading error message

2025-08-29 Thread Álvaro Herrera
CREATE STATISTICS: improve misleading error message I think the error message for a different condition was inadvertently copied. This problem seems to have been introduced by commit a4d75c86bf15. Author: Álvaro Herrera Reported-by: jian he Reviewed-by: Tom Lane Backpatch-through: 14 Discussi