pgsql: btree_gin: Fix calculation of leftmost interval value.

2023-10-29 Thread Dean Rasheed
btree_gin: Fix calculation of leftmost interval value. Formerly, the value computed by leftmostvalue_interval() was a long way short of the minimum possible interval value. As a result, an index scan on a GIN index on an interval column with < or <= operators would miss large negative interval va

pgsql: btree_gin: Fix calculation of leftmost interval value.

2023-10-29 Thread Dean Rasheed
btree_gin: Fix calculation of leftmost interval value. Formerly, the value computed by leftmostvalue_interval() was a long way short of the minimum possible interval value. As a result, an index scan on a GIN index on an interval column with < or <= operators would miss large negative interval va

pgsql: btree_gin: Fix calculation of leftmost interval value.

2023-10-29 Thread Dean Rasheed
btree_gin: Fix calculation of leftmost interval value. Formerly, the value computed by leftmostvalue_interval() was a long way short of the minimum possible interval value. As a result, an index scan on a GIN index on an interval column with < or <= operators would miss large negative interval va

pgsql: btree_gin: Fix calculation of leftmost interval value.

2023-10-29 Thread Dean Rasheed
btree_gin: Fix calculation of leftmost interval value. Formerly, the value computed by leftmostvalue_interval() was a long way short of the minimum possible interval value. As a result, an index scan on a GIN index on an interval column with < or <= operators would miss large negative interval va

pgsql: btree_gin: Fix calculation of leftmost interval value.

2023-10-29 Thread Dean Rasheed
btree_gin: Fix calculation of leftmost interval value. Formerly, the value computed by leftmostvalue_interval() was a long way short of the minimum possible interval value. As a result, an index scan on a GIN index on an interval column with < or <= operators would miss large negative interval va

pgsql: btree_gin: Fix calculation of leftmost interval value.

2023-10-29 Thread Dean Rasheed
btree_gin: Fix calculation of leftmost interval value. Formerly, the value computed by leftmostvalue_interval() was a long way short of the minimum possible interval value. As a result, an index scan on a GIN index on an interval column with < or <= operators would miss large negative interval va

pgsql: btree_gin: Fix calculation of leftmost interval value.

2023-10-29 Thread Dean Rasheed
btree_gin: Fix calculation of leftmost interval value. Formerly, the value computed by leftmostvalue_interval() was a long way short of the minimum possible interval value. As a result, an index scan on a GIN index on an interval column with < or <= operators would miss large negative interval va

pgsql: Guard against overflow in make_interval().

2023-10-29 Thread Dean Rasheed
Guard against overflow in make_interval(). The original code did very little to guard against integer or floating point overflow when computing the interval's fields. Detect any such overflows and error out, rather than silently returning bogus results. Joseph Koshakow, reviewed by Ashutosh Bapa

pgsql: Teach pg_dump about the new pg_subscription.subrunasowner option

2023-10-29 Thread Tom Lane
Teach pg_dump about the new pg_subscription.subrunasowner option. Among numerous other oversights, commit 482675987 neglected to fix pg_dump to dump this new subscription option. Since the new default is "false" while the previous behavior corresponds to "true", this would cause legacy subscripti

pgsql: Teach pg_dump about the new pg_subscription.subrunasowner option

2023-10-29 Thread Tom Lane
Teach pg_dump about the new pg_subscription.subrunasowner option. Among numerous other oversights, commit 482675987 neglected to fix pg_dump to dump this new subscription option. Since the new default is "false" while the previous behavior corresponds to "true", this would cause legacy subscripti

pgsql: Fix instable 006_login_trigger.pl test

2023-10-29 Thread Alexander Korotkov
Fix instable 006_login_trigger.pl test Handling of login trigger FATAL error could cause a timing-dependant panic of IPC::Run. This commit excludes checks which involves handling of such errors. Reported-by: Tom Lane Discussion: https://postgr.es/m/2268825.1698618066%40sss.pgh.pa.us Branch

pgsql: Refactor some code related to transaction-level statistics for r

2023-10-29 Thread Michael Paquier
Refactor some code related to transaction-level statistics for relations This commit refactors find_tabstat_entry() so as transaction counters for inserted, updated and deleted tuples are included in the result returned. If a shared entry is found for a relation, its result is now a copy of the

pgsql: Introduce pg_stat_checkpointer

2023-10-29 Thread Michael Paquier
Introduce pg_stat_checkpointer Historically, the statistics of the checkpointer have been always part of pg_stat_bgwriter. This commit removes a few columns from pg_stat_bgwriter, and introduces pg_stat_checkpointer with equivalent, renamed columns (plus a new one for the reset timestamp): - chec

pgsql: Mention standby.signal in FATALs for checkpoint record missing a

2023-10-29 Thread Michael Paquier
Mention standby.signal in FATALs for checkpoint record missing at recovery When beginning recovery from a base backup by reading a backup_label file, it may be possible that no checkpoint record is available depending on the method used when the case backup was taken, which would prevent recovery

pgsql: Doc: Make link names consistent in logical replication commands.

2023-10-29 Thread Amit Kapila
Doc: Make link names consistent in logical replication commands. Commit 536f410111 added links in the ALTER SUBSCRIPTION command page. The link names used were slightly different from what other logical replication commands like CREATE SUBSCRIPTION/PUBLICATION have but were consistent with other d

pgsql: Delay recovery mode LOG after reading backup_label and/or checkp

2023-10-29 Thread Michael Paquier
Delay recovery mode LOG after reading backup_label and/or checkpoint record When beginning recovery, a LOG is displayed by the startup process to show which recovery mode will be used depending on the .signal file(s) set in the data folder, like "standby mode", recovery up to a given target type a