pgsql: Lower bounds related to pgstats kinds

2025-07-24 Thread Michael Paquier
Lower bounds related to pgstats kinds This commit changes stats kinds to have the following bounds, making their handling in core cheaper by default: - PGSTAT_KIND_CUSTOM_MIN 128 -> 24 - PGSTAT_KIND_MAX 256 -> 32 The original numbers were rather high, and showed an impact on performance in pgstat

pgsql: Lower bounds related to pgstats kinds

2025-07-24 Thread Michael Paquier
Lower bounds related to pgstats kinds This commit changes stats kinds to have the following bounds, making their handling in core cheaper by default: - PGSTAT_KIND_CUSTOM_MIN 128 -> 24 - PGSTAT_KIND_MAX 256 -> 32 The original numbers were rather high, and showed an impact on performance in pgstat

pgsql: Fix return value of visibilitymap_get_status().

2025-07-24 Thread Nathan Bossart
Fix return value of visibilitymap_get_status(). This function is declared as returning a uint8, but it returns a bool in one code path. To fix, return (uint8) 0 instead of false there. This should behave exactly the same as before, but it might prevent future compiler complaints. Oversight in c

pgsql: Fix duplicate transaction replay during pg_createsubscriber.

2025-07-24 Thread Amit Kapila
Fix duplicate transaction replay during pg_createsubscriber. Previously, the tool could replay the same transaction twice, once during recovery, then again during replication after the subscriber was set up. This occurred because the same recovery_target_lsn was used both to finalize recovery and

pgsql: Fix duplicate transaction replay during pg_createsubscriber.

2025-07-24 Thread Amit Kapila
Fix duplicate transaction replay during pg_createsubscriber. Previously, the tool could replay the same transaction twice, once during recovery, then again during replication after the subscriber was set up. This occurred because the same recovery_target_lsn was used both to finalize recovery and

pgsql: Fix duplicate transaction replay during pg_createsubscriber.

2025-07-24 Thread Amit Kapila
Fix duplicate transaction replay during pg_createsubscriber. Previously, the tool could replay the same transaction twice, once during recovery, then again during replication after the subscriber was set up. This occurred because the same recovery_target_lsn was used both to finalize recovery and