Re: Remove wal_[sync|write][_time] from pg_stat_wal and track_wal_io_timing - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Remove wal_[sync|write][_time] from pg_stat_wal and track_wal_io_timing
Date
Msg-id 3opf2wh2oljco6ldyqf7ukabw3jijnnhno6fjb4mlu6civ5h24@fcwmhsgmlmzu
Whole thread Raw
In response to Re: Remove wal_[sync|write][_time] from pg_stat_wal and track_wal_io_timing  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Remove wal_[sync|write][_time] from pg_stat_wal and track_wal_io_timing
List pgsql-hackers
Hi,

On 2025-02-20 14:37:18 +0900, Michael Paquier wrote:
> a051e71e28a added this information into pg_stat_io (with more details and
> granularity), so there is no need to keep it in pg_stat_wal. This also
> allows to remove PendingWalStats and simplifies up coming commits related
> to per backend WAL statistics. Once done, track_wal_io_timing becomes useless
> so it is also removed.
> 
> In passing remove the pgstat_prepare_io_time() parameter now that
> track_wal_io_timing is gone.

I don't think this is a good idea - there was a good reason for
track_wal_io_timing to exist, namely that it happens while holding one of the
two most contended locks in postgres.  On many systems it'll be an ok constant
overhead to enable track_io_timing, but enabling track_wal_io_timing will
cause scalability issues.  Now you made it impossible to separate those two
situations, forcing disabling of all IO timing.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Shubham Khanna
Date:
Subject: Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.
Next
From: Amit Kapila
Date:
Subject: Re: long-standing data loss bug in initial sync of logical replication