Re: faulty error handling around pgstat_count_io_op_time()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: faulty error handling around pgstat_count_io_op_time()
Date: 2026-06-17 05:42:21
Message-ID: ajIzvYDlo9_X7w2_@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 17, 2026 at 10:29:36AM +0530, Ayush Tiwari wrote:
> I agree on this change, but the original placement was also recording
> the I/O timing of the attempted write, not just byte count, so moving
> it post save_errno drops that. (But even the ordinary write/fsync
> paths ereport before reaching their pgstat_count_io_op_time() call).

FWIW, I don't understand why registering the time taken for a failure
would make sense for WAL segment inits. :)
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2026-06-17 05:44:47 Re: Avoid orphaned objects dependencies, take 3
Previous Message jihyun bahn 2026-06-17 05:15:55 Re: [PATCH] Fix replica identity mismatch for partitioned tables with publish_via_partition_root