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 1rmNpl-007YJ6-RD for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Mar 2024 01:00:07 +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 1rmNpj-007zhd-4B for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Mar 2024 01:00:03 +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 1rmNph-007zhP-BT for pgsql-hackers@lists.postgresql.org; Tue, 19 Mar 2024 01:00:03 +0000 Received: from wfout2-smtp.messagingengine.com ([64.147.123.145]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rmNpd-005HEi-2n for pgsql-hackers@lists.postgresql.org; Tue, 19 Mar 2024 01:00:00 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.west.internal (Postfix) with ESMTP id 983E91C00072; Mon, 18 Mar 2024 20:59:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 18 Mar 2024 20:59:52 -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=fm2; t=1710809992; x=1710896392; bh=MReqCkwrNj KxW/FVLD/Cjy0nQdKuIvaGRfvG0JqNZpY=; b=gJ4fXr6XxqoUgt0EfzPDRZnq2m k//pFoocsT4QshML9Amfdf5QJiVlSqVXydnZcUxpwOHQatCDwJjIp5Xcl6Fb3VQv dlrGkDOrA5fODOilISFkHRw2h5YIpafMuSilk3r2RtMkzhLueBW8EpoXtyVtSjk9 EO/oxT8BabVABrIdLQ1OjLI/+UU+7aVoQJGYUSVmcVs4kGI8o3AmfHOplLBJtkkw R4nNN9I1N3RUCyvbJc/oYElSYA8fcbMIoyDxUu4d1y4f5fCns48LXE47KfuCKhas /5yo6CaH3IZ+twB/GYPN0QDQf6NCILuOrTnMtV+d7DK2B0oSknlIWlz/UqQg== 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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1710809992; x=1710896392; bh=MReqCkwrNjKxW/FVLD/Cjy0nQdKu IvaGRfvG0JqNZpY=; b=gKulBTdf8bSC3gs2JjM+FCS47q/pnYRBYwpYejpo7ssU kqN1mzlmjmYP4IrW6FQtlNJtG1i2uDqZbdq/rwR8w85wN9XnCu4MQWH+FXyM5Dkc 1aF8OI8LsltsBvNOJsBArh7ktl33r+S3+x7bAOxtc5fO/Ihsm/oBe4LHy/EZt+lZ irY9vgQrppaD9zwI/2uu8w7FMJZPP9TrKby91wswV1ioU/Y27uDlsGtwriKEhhqD m39NL2CYtLx71JHe+9/DLtFqcSkbL1AOiwpnm3sjtHKMRgQIRR18OoJtXb0Q6FRF RnwerA2d21YPFet3TdVtjgId6Z+Tqo14u+cyT4Fr/g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkeekgddvlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeg geffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 18 Mar 2024 20:59:49 -0400 (EDT) Date: Tue, 19 Mar 2024 09:59:35 +0900 From: Michael Paquier To: Bertrand Drouvot Cc: Noah Misch , PostgreSQL Hackers Subject: Re: Autogenerate some wait events code and documentation Message-ID: References: <0b3cdac7-f078-61a6-76e0-99db7aae78ce@gmail.com> <20240317183114.16@rfd.leadboat.com> <20240318154934.10.nmisch@google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RVkrCdGxhX9+pT3s" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --RVkrCdGxhX9+pT3s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 18, 2024 at 05:57:02PM +0000, Bertrand Drouvot wrote: > Thanks for looking at it! > Oh right, the comment is wrong, re-worded in v2 attached. I've added a couple of fake events in my txt file, and this results in an ordering of the wait events in the docs while the backpatched wait events are added at the end of the enums, based on their order in the txt file. # When adding a new wait event, make sure it is placed in the appropriate -# ClassName section. +# ClassName section. If the wait event is backpatched from master to a version +# >= 17 then put it under a "Backpatch:" delimiter at the end of the related +# ClassName section (on the non master branches) or at its natural position on +# the master branch. +# Ensure that the backpatch regions are always empty on the master branch. I'd recommend to not mention a version number at all, as this would need a manual refresh each time a new stable branch is forked. Your solution is simpler than what I finished in mind when looking at the code yesterday, with the addition of a second array that's pushed to be at the end of the "sorted" lines ordered by the second column. That does the job. (Note that I'll go silent for some time; I'll handle this thread when I get back as this is not urgent.) -- Michael --RVkrCdGxhX9+pT3s Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmX443cACgkQnvQgOdby QH0+VA/8DTmxcWx9auHMO/fPfLPFtKct1/ahULksyn2CtVyVX8i0xOKopP6zcZbH Q+9Ils2Q8anONkx+m2o9pDIeJLSbjSM+7pUqZzQpVPlTnrkGCtS7llmViqEQ2gga wIfi+mW7GE5McYT0W8G3h0u5HbqD/ktErKVpqZEgnTiRWq897vrAZ05lU2GsEuRr S6kuosYfSoveJELKTMl/btEg4N5O+VTI94Tskwe9Xie/5rACBt/rgYfGHi/fX3fh K/91uEwnLlgrLgbhHSwMLx+guOZ5Z+Ii0NXBid3jIMStCGFUlmRV6Jr8zgSUtHO4 c/msmJcBS3pdHztpVR14+9LGeJdOtWTra5YAMhEH/ULdewW1Dkaky63JOqSPHMo1 AZFLSIhI4cH4gJXLooWYTCsn76n26BU4llK6LWog5lB+K5TmKyNGH/wVOgwFVqwP EoZU+dcQ6SjI1RCh/HXs4FyXgbqgbFN85i4LIgOMoKALMWjxO5ZqY7sOdYeOBgL8 VofWnG/WlMZWdYw7LA258eyOLVGeEY1bf9FScsJE/Ac2q051Sid1FYLg98e754cn EMkLJ8jiNNiRbbVAkAgeuK9QQV8j14IXPrRM8t3JyGMA8ykNzatJok7Ke1ix2hOr hBDKwbJsuyAQpjmIEJ39P8prYpndKWWjsFJGZ6/MwiicHu9LHx0= =ZSsd -----END PGP SIGNATURE----- --RVkrCdGxhX9+pT3s--