pgsql: Fix StatisticsObjIsVisibleExt() for pg_temp.

2025-09-29 Thread Noah Misch
Fix StatisticsObjIsVisibleExt() for pg_temp. Neighbor get_statistics_object_oid() ignores objects in pg_temp, as has been the standard for non-relation, non-type namespace searches since CVE-2007-2138. Hence, most operations that name a statistics object correctly decline to map an unqualified na

pgsql: Fix StatisticsObjIsVisibleExt() for pg_temp.

2025-09-29 Thread Noah Misch
Fix StatisticsObjIsVisibleExt() for pg_temp. Neighbor get_statistics_object_oid() ignores objects in pg_temp, as has been the standard for non-relation, non-type namespace searches since CVE-2007-2138. Hence, most operations that name a statistics object correctly decline to map an unqualified na

pgsql: injection_points: Add proper locking when reporting fixed-variab

2025-09-29 Thread Michael Paquier
injection_points: Add proper locking when reporting fixed-variable stats Contrary to its siblings for the archiver, the bgwriter and the checkpointer stats, pgstat_report_inj_fixed() can be called concurrently. This was causing an assertion failure, while messing up with the stats. This code is

pgsql: injection_points: Add proper locking when reporting fixed-variab

2025-09-29 Thread Michael Paquier
injection_points: Add proper locking when reporting fixed-variable stats Contrary to its siblings for the archiver, the bgwriter and the checkpointer stats, pgstat_report_inj_fixed() can be called concurrently. This was causing an assertion failure, while messing up with the stats. This code is

pgsql: Reorder XLogNeedsFlush() checks to be more consistent

2025-09-29 Thread Michael Paquier
Reorder XLogNeedsFlush() checks to be more consistent During recovery, XLogNeedsFlush() checks the minimum recovery LSN point instead of the flush LSN point. The same condition checks are used when updating the minimum recovery point in UpdateMinRecoveryPoint(), but are written in reverse order.