pgsql: Add worker type argument to logical replication worker functions

2025-10-27 Thread Amit Kapila
Add worker type argument to logical replication worker functions. Extend logicalrep_worker_stop, logicalrep_worker_wakeup, and logicalrep_worker_find to accept a worker type argument. This change enables differentiation between logical replication worker types, such as apply workers and table sync

pgsql: Simplify newline handling in two TAP tests

2025-10-27 Thread Michael Paquier
Simplify newline handling in two TAP tests Two tests are changed in this commit: - libpq's 006_service - ldap's 003_ldap_connection_param_lookup CRLF translation is already handled by the text mode, so there should be need for any specific logic. See also 1c6d4629394d, msys perl being one case w

pgsql: Fix a couple of comments.

2025-10-27 Thread Nathan Bossart
Fix a couple of comments. These were discovered while reviewing Aleksander Alekseev's proposed changes to pgindent. Oversights in commits 393e0d2314 and 25a30bbd42. Discussion: https://postgr.es/m/aP-H6kSsGOxaB21k%40nathan Branch -- master Details --- https://git.postgresql.org/pg/comm

pgsql: Add new RLS tests to test policies applied by command type.

2025-10-27 Thread Dean Rasheed
Add new RLS tests to test policies applied by command type. The existing RLS tests focus on the outcomes of various testing scenarios, rather than the exact policies applied. This sometimes makes it hard to see why a particular result occurred (e.g., which policy failed), or to construct a test th

pgsql: Add some const qualifications

2025-10-27 Thread Peter Eisentraut
Add some const qualifications Add some const qualifications afforded by the previous change that added a const qualification to PageAddItemExtended(). Reviewed-by: Nathan Bossart Reviewed-by: Peter Geoghegan Discussion: https://www.postgresql.org/message-id/flat/c75cccf5-5709-407b-a36a-2ae6570

pgsql: Remove Item type

2025-10-27 Thread Peter Eisentraut
Remove Item type This type is just char * underneath, it provides no real value, no type safety, and just makes the code one level more mysterious. It is more idiomatic to refer to blobs of memory by a combination of void * and size_t, so change it to that. Also, since this type hides the pointe

pgsql: Remove meaninglist restrict qualifiers

2025-10-27 Thread Peter Eisentraut
Remove meaninglist restrict qualifiers The use of the restrict qualifier in casts is meaningless, so remove them. Reviewed-by: Tom Lane Discussion: https://www.postgresql.org/message-id/flat/0e3d8644-c01d-4374-86ea-9f0a987981f0%40eisentraut.org Branch -- master Details --- https://git

pgsql: Fix GUC check_hook validation for synchronized_standby_slots.

2025-10-27 Thread Amit Kapila
Fix GUC check_hook validation for synchronized_standby_slots. Previously, the check_hook for synchronized_standby_slots attempted to validate that each specified slot existed and was physical. However, these checks were not performed during server startup. As a result, if users configured non-exis