pgsql: Remove obsolete comment

2025-10-28 Thread Peter Eisentraut
Remove obsolete comment The comment "type prefixes (const, signed, volatile, inline) are handled in pg_config.h." has been mostly not true for a long time. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c094be259b918fbcae5bed12d6c6b64bcb4c4846 Modified Files -

pgsql: Simplify newline handling in libpq TAP test

2025-10-28 Thread Michael Paquier
Simplify newline handling in libpq TAP test CRLF translation is already handled by the text mode, so there should be no need for any specific logic. See also 1c6d4629394d, msys perl being one case where the translation mattered. Note: An equivalent has been first applied on HEAD with 8767b449a3a

pgsql: Fix correctness issue with computation of FPI size in WAL stats

2025-10-28 Thread Michael Paquier
Fix correctness issue with computation of FPI size in WAL stats XLogRecordAssemble() may be called multiple times before inserting a record in XLogInsertRecord(), and the amount of FPIs generated inside a record whose insertion is attempted multiple times may vary. The logic added in f9a09aa29520

pgsql: Add psql PROMPT variable for search_path.

2025-10-28 Thread Nathan Bossart
Add psql PROMPT variable for search_path. The new %S substitution shows the current value of search_path. Note that this only works when connected to Postgres v18 or newer, since search_path was first marked as GUC_REPORT in commit 28a1121fd9. On older versions that don't report search_path, %S i

pgsql: formatting.c cleanup: Move loop variables definitions into for s

2025-10-28 Thread Peter Eisentraut
formatting.c cleanup: Move loop variables definitions into for statement Reviewed-by: Chao Li Discussion: https://www.postgresql.org/message-id/flat/6dd9d208-a3ed-49b5-b03d-8617261da973%40eisentraut.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/03fbb0814c501

pgsql: formatting.c cleanup: Remove dashes in comments

2025-10-28 Thread Peter Eisentraut
formatting.c cleanup: Remove dashes in comments This saves some vertical space and makes the comments style more consistent with the rest of the code. Reviewed-by: Chao Li Discussion: https://www.postgresql.org/message-id/flat/6dd9d208-a3ed-49b5-b03d-8617261da973%40eisentraut.org Branch --

pgsql: Don't error out when dropping constraint if relchecks is already

2025-10-28 Thread Álvaro Herrera
Don't error out when dropping constraint if relchecks is already zero I have never seen this be a problem in practice, but it came up when purposely corrupting catalog contents to study the fix for a nearby bug: we'd try to decrement relchecks, but since it's zero we error out and fail to drop the

pgsql: Move comment about casts from pg_wchar.

2025-10-28 Thread Jeff Davis
Move comment about casts from pg_wchar. Suggested-by: Thomas Munro Discussion: https://postgr.es/m/ca+hukglxquyk7cq5kblggtwo7pors7yhbwo1aenzt7xtybl...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4da12e9e2e3c011a3fc8354ca451d6a82c017fa3 Modified

pgsql: Check that index can return in get_actual_variable_range()

2025-10-28 Thread Peter Eisentraut
Check that index can return in get_actual_variable_range() Some recent changes were made to remove the explicit dependency on btree indexes in some parts of the code. One of these changes was made in commit 9ef1851685b, which allows non-btree indexes to be used in get_actual_variable_range(). A

pgsql: Check that index can return in get_actual_variable_range()

2025-10-28 Thread Peter Eisentraut
Check that index can return in get_actual_variable_range() Some recent changes were made to remove the explicit dependency on btree indexes in some parts of the code. One of these changes was made in commit 9ef1851685b, which allows non-btree indexes to be used in get_actual_variable_range(). A

pgsql: Add wal_fpi_bytes to pg_stat_wal and pg_stat_get_backend_wal()

2025-10-28 Thread Michael Paquier
Add wal_fpi_bytes to pg_stat_wal and pg_stat_get_backend_wal() This new counter, called "wal_fpi_bytes", tracks the total amount in bytes of full page images (FPIs) generated in WAL. This data becomes available globally via pg_stat_wal, and for backend statistics via pg_stat_get_backend_wal(). P