Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1twUwj-00F4Iq-OR for pgsql-hackers@arkaria.postgresql.org; Sun, 23 Mar 2025 23:41:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1twUwi-007fh3-1W for pgsql-hackers@arkaria.postgresql.org; Sun, 23 Mar 2025 23:41:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1twUwh-007fgu-0z for pgsql-hackers@lists.postgresql.org; Sun, 23 Mar 2025 23:41:35 +0000 Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1twUwf-000kwH-0j for pgsql-hackers@lists.postgresql.org; Sun, 23 Mar 2025 23:41:34 +0000 Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.stl.internal (Postfix) with ESMTP id 42B5B25400F6; Sun, 23 Mar 2025 19:41:31 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Sun, 23 Mar 2025 19:41:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1742773291; x=1742859691; bh=ja/8E3y6rf cu0fEBGVTZJQ8PhfumNV9EbKxOaYNc758=; b=gAOFb4s2wAt6xqHD4eMxLiJtIN MmzSo1X9X1LMuVFydUBqEEWLOoh5aAOWkdiWUof4cYA/VjKlp+GxYa0s/2tWnS9k VdtY4VH9ITSadPeD2NGrEsrvd1wel8Pg1qKOSiuxQpzMSHqP6VjzZJvZ6S40b/AS 2a/a/QUuCzdAJUsQRge1I7S+k4sGRfdlr0nD9Oh2NVuGGl72My0pLiS41JwLAcag FqjqySX5YogfduKUe8+lvB7aojCkeMLFp2+YuYd66ZdrtXNJoC1SBZ+47ZUrzA7L Ozjojpln2yjaMNX4erE9u420r1+YWxyelArTnpoGE2kAicr7CU+w7tdtN2YA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1742773291; x=1742859691; bh=ja/8E3y6rfcu0fEBGVTZJQ8PhfumNV9EbKx OaYNc758=; b=zSmqrb1USh2NY4VFSAs8GB+apKNIdysYDg2rvqkLNxSEOq64B9h 1ohMd2REWxpb2UUhYIChbEvSAyTU6sjHXUkJD6k90QNieXpWtXCf99K+ZDyX84Am uLmmh9WUxRhsLUjbvQ4eAUhhQzmojWJyGyjbhzl5xF4t1MfR2CtLhTKnLkqZNWgb cbWeKSYFPYQGHl8xJA0cgx5HXIbw+CZQVaxWmTgxqZ6kQzwF2MOqJOMFE8pqEe8u m6HTMcROL3Vi9bxirXfhD51KtzVSd4qG6rFHiURZWGcmzrD0E9F8ezK6QCX09uRr fsIWRoha8Jo37veZeAzGxInVlNTt0u0fexQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduheekvdefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnegfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefu kfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivg hruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhep teelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdejnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggv lhesphgrqhhuihgvrhdrgiihiidpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtph houhhtpdhrtghpthhtohepgihunhgvnhhgiihhohhusehgmhgrihhlrdgtohhmpdhrtghp thhtohepsggvrhhtrhgrnhguughrohhuvhhothdrphhgsehgmhgrihhlrdgtohhmpdhrtg hpthhtoheprghnughrvghssegrnhgrrhgriigvlhdruggvpdhrtghpthhtohepphhgshhq lhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 23 Mar 2025 19:41:28 -0400 (EDT) Date: Mon, 24 Mar 2025 08:41:20 +0900 From: Michael Paquier To: Xuneng Zhou Cc: Bertrand Drouvot , Andres Freund , pgsql-hackers@lists.postgresql.org Subject: Re: Fwd: [BUG]: the walsender does not update its IO statistics until it exits Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8wJDsyzuiM34ElHP" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --8wJDsyzuiM34ElHP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 19, 2025 at 04:00:49PM +0800, Xuneng Zhou wrote: > Hi, > Moving the other two provides a more complete view of the settings. For > newcomers(like me) to the codebase, seeing all three related values in one > place helps avoid a narrow view of the settings. >=20 > But I am not sure that I understand the cons of this well. While I don't disagree with the use of a hardcoded interval of time to control timing the flush of the WAL sender stats, do we really need to rely on the timing defined by pgstat.c? Wouldn't it be simpler to assign one in walsender.c and pick up a different, perhaps higher, value? At the end the timestamp calculations are free because we can rely on the existing call of GetCurrentTimestamp() for the physical WAL senders to get an idea of the current time. For the logical WAL senders, perhaps we'd better do the reports in WalSndWaitForWal(), actually. There is also a call to GetCurrentTimestamp() that we can rely on in this path. -- Michael --8wJDsyzuiM34ElHP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmfgnCAACgkQnvQgOdby QH0+Aw//dGj/9VVBdvtEhfRFXSZ7PLagGsHhaCPq2h6XNcT7+q10AL0ADR2yRIX2 mZYtunmXD4zRcYxshmHFZONJ5o+pnDO7pHbdRs1PUQfnpaz8ibUjKkZS2267/XtX 21S8l2EfQKD2vRsY3OXhfcADlSCXcEDg6tQglba9sPKqr32L1OrcvcJ8wZfIxuJ0 dToqY6OmVqwYpZwhP8NaxFYm2JDA7n6i8hLUptE7aLG7LVIycK2YCncyCxZMco15 iyhSWui/de3loj4U0bXpYLA3UNlSkkrEPSR0ni8JQ+kiDWw2kiQY8iMIYkRO7RgX q6LwZjOST5ScYQfoV4CNjnWDzKZ61f4HkUxGrnN1KNrkkNo1hJQ6q5Zyp8cRluHV JamHLatfiCYntQp/Proqk3kc+rA4GC8ZIdHly2HthcUGRW8nMeXMQNXBMjEHh9bW DXgWRSbd/XEneKVGyrJ/Q7dS6bRn4+X1kX3HNxyAWCYO3fiflktKbnN91QgEY/NR ugBq5OsWOObVRex+Dcf7Ic8mAEE3fSbPFH2fX1sR2qziLPc0vuINSU89RFvNhiFN Gea6pEWgh59SwegsIssR/RsAIDAyzeRyDh/LmzChErZ+Hs7U4coMpnR3dmdmfGaa sKbcbhSNjTZVeaT/l8Wl0uKBfV2qBqhNMn3Y5gExTnMHq2Wk/bE= =Av3l -----END PGP SIGNATURE----- --8wJDsyzuiM34ElHP--