pg_stat_io for the startup process

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_stat_io for the startup process
Date: 2023-04-25 13:51:14
Message-ID: 5315aedc-fbca-1556-c5de-dc2e00b23a14@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Regarding pg_stat_io for the startup process, I noticed that the counters
are only incremented after the startup process exits, not during WAL replay
in standby mode. This is because pgstat_flush_io() is only called when
the startup process exits. Shouldn't it be called during WAL replay as well
to report IO statistics by the startup process even in standby mode?

Also, the pg_stat_io view includes a row with backend_type=startup and
context=vacuum, but it seems that the startup process doesn't perform
any I/O operations with BAS_VACUUM. If this understanding is right,
shouldn't we omit this row from the view? Additionally, I noticed that
the view also includes a row with backend_type=startup and
context=bulkread / bulkwrite. Do these operations actually occur
during startup process?

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Denis Laxalde 2023-04-25 14:23:32 Re: Add PQsendSyncMessage() to libpq
Previous Message Daniel Gustafsson 2023-04-25 13:35:45 Re: Should vacuum process config file reload more often