pgsql: Fix off-by-one loop termination condition in pg_stat_get_subscri

2022-06-07 Thread Tom Lane
Fix off-by-one loop termination condition in pg_stat_get_subscription(). pg_stat_get_subscription scanned one more LogicalRepWorker array entry than is really allocated. In the worst case this could lead to SIGSEGV, if the LogicalRepCtx data structure is near the end of shared memory. That seems

pgsql: Fix off-by-one loop termination condition in pg_stat_get_subscri

2022-06-07 Thread Tom Lane
Fix off-by-one loop termination condition in pg_stat_get_subscription(). pg_stat_get_subscription scanned one more LogicalRepWorker array entry than is really allocated. In the worst case this could lead to SIGSEGV, if the LogicalRepCtx data structure is near the end of shared memory. That seems

pgsql: Fix off-by-one loop termination condition in pg_stat_get_subscri

2022-06-07 Thread Tom Lane
Fix off-by-one loop termination condition in pg_stat_get_subscription(). pg_stat_get_subscription scanned one more LogicalRepWorker array entry than is really allocated. In the worst case this could lead to SIGSEGV, if the LogicalRepCtx data structure is near the end of shared memory. That seems

pgsql: Fix off-by-one loop termination condition in pg_stat_get_subscri

2022-06-07 Thread Tom Lane
Fix off-by-one loop termination condition in pg_stat_get_subscription(). pg_stat_get_subscription scanned one more LogicalRepWorker array entry than is really allocated. In the worst case this could lead to SIGSEGV, if the LogicalRepCtx data structure is near the end of shared memory. That seems

pgsql: Fix off-by-one loop termination condition in pg_stat_get_subscri

2022-06-07 Thread Tom Lane
Fix off-by-one loop termination condition in pg_stat_get_subscription(). pg_stat_get_subscription scanned one more LogicalRepWorker array entry than is really allocated. In the worst case this could lead to SIGSEGV, if the LogicalRepCtx data structure is near the end of shared memory. That seems

pgsql: Fix off-by-one loop termination condition in pg_stat_get_subscri

2022-06-07 Thread Tom Lane
Fix off-by-one loop termination condition in pg_stat_get_subscription(). pg_stat_get_subscription scanned one more LogicalRepWorker array entry than is really allocated. In the worst case this could lead to SIGSEGV, if the LogicalRepCtx data structure is near the end of shared memory. That seems

pgsql: Harden Memoization code against broken data types

2022-06-07 Thread David Rowley
Harden Memoization code against broken data types Bug #17512 highlighted that a suitably broken data type could cause the backend to crash if either the hash function or equality function were in someway non-deterministic based on their input values. Such a data type could cause a crash of the ba

pgsql: Harden Memoization code against broken data types

2022-06-07 Thread David Rowley
Harden Memoization code against broken data types Bug #17512 highlighted that a suitably broken data type could cause the backend to crash if either the hash function or equality function were in someway non-deterministic based on their input values. Such a data type could cause a crash of the ba

pgsql: Restructure pg_upgrade output directories for better idempotence

2022-06-07 Thread Michael Paquier
Restructure pg_upgrade output directories for better idempotence 38bfae3 has moved the contents written to files by pg_upgrade under a new directory called pg_upgrade_output.d/ located in the new cluster's data folder, and it used a simple structure made of two subdirectories leading to a fixed st

pgsql: Fix portability issue in TAP tests of psql for locales

2022-06-07 Thread Michael Paquier
Fix portability issue in TAP tests of psql for locales Some locales use a comma as decimal separator (like Czech or French), and psql's 001_basic.pl for \timing was not able to handle that properly. This fixes the matching regexes to be able to handle both comma and dot as possible decimal separa