pgsql: Assert that buffers are marked dirty before XLogRegisterBuffer()

2023-10-23 Thread Jeff Davis
Assert that buffers are marked dirty before XLogRegisterBuffer(). Enforce the rule from transam/README in XLogRegisterBuffer(), and update callers to follow the rule. Hash indexes sometimes register clean pages as a part of the locking protocol, so provide a REGBUF_NO_CHANGE flag to support that

pgsql: doc: Improve example query related to pg_wait_events

2023-10-23 Thread Michael Paquier
doc: Improve example query related to pg_wait_events Author: Pavel Luzanov Discussion: https://postgr.es/m/4f79be75-7e30-4817-b0da-4a691ea54...@postgrespro.ru Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/befe9451fbf5a4b49e80f17917d8c6d8b5edad26 Modified Files -

pgsql: Fix typos in wait_event.c

2023-10-23 Thread Michael Paquier
Fix typos in wait_event.c Noticed while working on a different patch. Introduced in af720b4c50a1. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9972c7de1d078d30434c16081fe0624ee3d24a61 Modified Files -- src/backend/utils/activity/wait_event.c | 4 ++-

pgsql: jit: Adjust back-patch of f90b4a84 to 12 and 13.

2023-10-23 Thread Thomas Munro
jit: Adjust back-patch of f90b4a84 to 12 and 13. While back-patching f90b4a84, I missed that branches before REL_14_STABLE did some (accidental?) type punning in a function parameter, and failed to adjust these two branches accordingly. That didn't seem to cause a problem for newer LLVM versions

pgsql: jit: Adjust back-patch of f90b4a84 to 12 and 13.

2023-10-23 Thread Thomas Munro
jit: Adjust back-patch of f90b4a84 to 12 and 13. While back-patching f90b4a84, I missed that branches before REL_14_STABLE did some (accidental?) type punning in a function parameter, and failed to adjust these two branches accordingly. That didn't seem to cause a problem for newer LLVM versions

pgsql: Change struct tablespaceinfo's oid member from 'char *' to 'Oid'

2023-10-23 Thread Robert Haas
Change struct tablespaceinfo's oid member from 'char *' to 'Oid' This shouldn't change behavior except in the unusual case where there are file in the tablespace directory that have entirely numeric names but are nevertheless not possible names for a tablespace directory, either because their name

pgsql: Refactor parse_filename_for_nontemp_relation to parse more.

2023-10-23 Thread Robert Haas
Refactor parse_filename_for_nontemp_relation to parse more. Instead of returning the number of characters in the RelFileNumber, return the RelFileNumber itself. Continue to return the fork number, as before, and additionally return the segment number. parse_filename_for_nontemp_relation now rejec