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 1qWrmF-004Yi8-Vk for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Aug 2023 05:12:03 +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 1qWrmE-008Pio-AT for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Aug 2023 05:12:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWrmE-008Pig-0C for pgsql-hackers@lists.postgresql.org; Fri, 18 Aug 2023 05:12:02 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWrm7-000nN3-89 for pgsql-hackers@postgresql.org; Fri, 18 Aug 2023 05:12:01 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D8F8632004AE; Fri, 18 Aug 2023 01:11:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 18 Aug 2023 01:11:53 -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:sender :subject:subject:to:to; s=fm1; t=1692335512; x=1692421912; bh=bd BJedb5Z5VbHlwyzrplMxOjvmUfC6OK2fHdiStnJZI=; b=Z20aoj/wRB9DjQF/2d QR5CowhEATUvUzgMX+TQUuwynfovKHeZV0kLcM8d8k7fEKP3fq5C7Pa2HwQbBAhP 7RIvRvEmMAof+MrgPuFq8ZS5N7m2BU6IjnlVR1hZfYQoCrjS307G2MNbXYSVM5h5 PqiolLE84hEmxW8UxG4uMFSE2is7mNqW1qYYc8MwLJJB1YzREiZMv3od0xPeYayu U+3fTFwN2VxfWCBb0tbuMjRnb52jLMdhbguqD5wlvu1SkqQrWLS52Js8ORs/pUX5 SIFAeqUbLQPJ722DDYracY4ysYnR/bjHThduQO2tKahiUzZfbXOIjnsLCsEGaOlP Fldw== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1692335512; x=1692421912; bh=bdBJedb5Z5VbH lwyzrplMxOjvmUfC6OK2fHdiStnJZI=; b=Ta+lRKItxKkxjnHbAfnk2319zHKOu YGDajl0p9omwM107FTxBqYEeEufTR4x63bC3v+B6OoGnrwNbiXoz23s9Bt51oGnZ Wx8gGfuKqGcr1UXTAUYytX95nCR51Ml+GJthB0q3tkHV+4/FwbgcjBlYrLHV4rW+ QbxKPndTqDmQKHLbQSluQo9/FCOn53uiFAv+UzHOTLi04hRve6HK9v3I6gJ12WXi HmZu/H9wiFhzDkb2hAMpwc6GgMayMO6DLZo0EfpflARXZonRdg0XF7tMW0lE9fw4 XXQ+MuVw3InPvsQIAdsXPqFW+l9y6gWDqKy80Af6XkZ65GeQrSg7XXekA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudduvddgledvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 18 Aug 2023 01:11:50 -0400 (EDT) Date: Fri, 18 Aug 2023 14:11:47 +0900 From: Michael Paquier To: Masahiro Ikeda Cc: pgsql-hackers Subject: Re: Rethink the wait event names for postgres_fdw, dblink and etc Message-ID: References: <197bce267fa691a0ac62c86c4ab904c4@oss.nttdata.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YsXXpDNpdLnZpylf" Content-Disposition: inline In-Reply-To: <197bce267fa691a0ac62c86c4ab904c4@oss.nttdata.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --YsXXpDNpdLnZpylf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 18, 2023 at 12:27:02PM +0900, Masahiro Ikeda wrote: > I expect that no one will object to changing the names to appropriate > ones. But, we need to discuss that naming convention, the names themselve= s, > document descriptions and so on. >=20 > I made the v1 patch > * CamelCase naming convention Not sure how others feel about that, but I am OK with camel-case style for the modules. > I haven't added document descriptions for pg_prewarm and test modules. > The reason is that the wait event of autoprewarm is not shown on > pg_stat_activity. It's not an auxiliary-process and doesn't connect to > a database, so pgstat_bestart() isn't called. Perhaps we could just leave it out, then, adding a comment instead. > Feedback is always welcome and appreciated. + /* first time, allocate or get the custom wait event */ + if (wait_event_info =3D=3D 0) + wait_event_info =3D WaitEventExtensionNew("DblinkConnect"); [...] + /* first time, allocate or get the custom wait event */ + if (wait_event_info =3D=3D 0) + wait_event_info =3D WaitEventExtensionNew("DblinkConnect"); Shouldn't dblink use two different strings? + if (wait_event_info =3D=3D 0) + wait_event_info =3D WaitEventExtensionNew("PgPrewarmDumpDelay"); Same about autoprewarm.c. The same flag is used in two different code paths. If removed from the patch, no need to do that, of course. +static uint32 wait_event_info_connect =3D 0; +static uint32 wait_event_info_receive =3D 0; +static uint32 wait_event_info_cleanup_receive =3D 0; Perhaps such variables could be named with shorter names proper to each module, like pgfdw_we_receive, etc. + dblink could show the following wait event under t= he wait=20 s/could show/can report/? + Waiting for same reason as PostgresFdwReceive, ex= cept that it's only for + abort. "Waiting for transaction abort on remote server"? --- Michael --YsXXpDNpdLnZpylf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmTe/ZMACgkQnvQgOdby QH1c5g//Rb52hZWXR7yhd7n7kaZGvbJ7rA4x13ilg0e3lS1aDSk0kP1TgVXn2Oy7 PCzfvBFrlYQFPsQsyY4LckmhbWWwQeKKYwKtU30U9Jqb1x0IuW/nbJN3yY51FeKQ dlcVGQnWTl6y6YJ10HYoBiGp5KRLNF4xxmONZIVuOVbiIeC6ZX4FngRC8iAR1xoJ PAhsybok0BJJUnvtyYLtsL8pfMbCfd9j/ExEyF4TBXZvSrkJzc6uE94G37QDC7La NtF8iSu5c1GKogVXffMpk1v7k1gn3PdNnNuRWlxpoWNDw/zhJFcxIfxAwOBQmzfj QZjtVVmvXYTVsQjdFusqY4TdR9XGuzrPPSF3zi/5JmcHhC+2MNWR96oZyqRyVhXP 29ctVtU38YGHDFWt2Y8xqXD/EuqdI2J2eexUTvMNWQ6e7JpJJ8R/tZ7I4PGM76Hx sqvD0xITiOM8KvBpN/NYh04w9NyXLThd9+sStLf9lPC+oJD+dids6+gI6Xcwsh8l kzqqWhDab05Vxf9iPT0gLT4onLwMsGsCVuZDp/BYaprxXzB4PzEbITekamg/ziD+ bQlkms2j2Z4Q7JOI0Td8UONVWXqWoBkOeQ5kUdsIGrwOTk32532ggZUN/x/QQXs3 hCEiaG+MeSpXoW4Yi6b7Awbcem024btoslFjtlcbl9PVtIBanc8= =lOge -----END PGP SIGNATURE----- --YsXXpDNpdLnZpylf--