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 1u8aBu-007kog-JS for pgsql-hackers@arkaria.postgresql.org; Sat, 26 Apr 2025 07:43:15 +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 1u8aBr-001x5l-CJ for pgsql-hackers@arkaria.postgresql.org; Sat, 26 Apr 2025 07:43:12 +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 1u8aBq-001x5d-9C for pgsql-hackers@lists.postgresql.org; Sat, 26 Apr 2025 07:43:11 +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 1u8aBo-0021f1-1n for pgsql-hackers@postgresql.org; Sat, 26 Apr 2025 07:43:10 +0000 Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id 421AE25401F1; Sat, 26 Apr 2025 03:43:07 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Sat, 26 Apr 2025 03:43:07 -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=fm3; t=1745653387; x=1745739787; bh=4XoLOZD7fu 7o3VET7kPSP99hEsHw5VNZGOV7BhAQ7ns=; b=hzzNuzLVu6oHD4SRc6Ar/tD5OE k47FkeAPe9OX0mhVYRfIbBbu06l8SN1GofzyKbJiS5IklqlWP8kcfSAwK0Hl3ksU THJtgycLnb9g4Rk2RLq1evnziivDXZFlQdVGrUlTWPArrOp0KnHEfw2dPbq4nk0m FpAEgCwFhRdY0ExQ1D2+NfGxAu7ZikxBz6t/72QuVRETmdvxgcDPPQr5Tw9LZAfn p8kNLQzhVU4I+tfjehRHznMqQiRK8CD9mJb0IGePV/wspO/lYCPi4QfAPo/kJ+O7 YmYf8V6hpmjskFVvZXczPmnV+pCECJ8jOBo6Jt/x3/rIppp97kQUGG62yQBw== 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=fm3; t= 1745653387; x=1745739787; bh=4XoLOZD7fu7o3VET7kPSP99hEsHw5VNZGOV 7BhAQ7ns=; b=TqOmdb2C5P/7HoTj8/w/GotyFFmP5lEfe8nxm3GfNS+p3TqdkC/ TmlJ9/NbxO4LZuW2s5FPmvMLyUuk06NjsG6Cbn8XTAkHeCj2Uk2wj9N5kBhBjBrQ H8ILfCA3eXNAACbLVSsna7/FathbaUxOGsHHfwYW25ESIjBdntccBUP3Y0tYmpfj Eg1rcFI1t8y4SKXCcqWszPX8S2tqvolLjttaZvXIJZyJTdtHxq8LMwcpif5Zj+TS TCAMK7bKvFTEnqXT0mCZBsm+tn49ckyqJoe2vVsKNWM/hos1zf9y5oMm1N5y3gQ1 uuL5PjZlf38i8gt0L9dfPYL09+Jh6fhUV+Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheegieefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnegfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefu kfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivg hruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhep teelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdejnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggv lhesphgrqhhuihgvrhdrgiihiidpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtph houhhtpdhrtghpthhtohepthhglhesshhsshdrphhghhdrphgrrdhushdprhgtphhtthho pegsvghrthhrrghnuggurhhouhhvohhtrdhpghesghhmrghilhdrtghomhdprhgtphhtth hopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 26 Apr 2025 03:43:04 -0400 (EDT) Date: Sat, 26 Apr 2025 16:42:56 +0900 From: Michael Paquier To: Tom Lane Cc: Bertrand Drouvot , PostgreSQL Hackers Subject: Re: Avoid circular header file dependency Message-ID: References: <2238517.1745644856@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Sr1M8wF/ywytFm6j" Content-Disposition: inline In-Reply-To: <2238517.1745644856@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Sr1M8wF/ywytFm6j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 26, 2025 at 01:20:56AM -0400, Tom Lane wrote: > Bertrand Drouvot writes: >> While working on wait events I faced some compilation issues due to circ= ular >> header file dependency (introduced in fa88928470b5) between wait_event.h= and >> wait_event_types.h. >=20 > Ugh. I still carry the scars of cleaning up after a previous > circular-inclusion mess (cf 1609797c2), so I'm always worried about > introducing new cases. I don't have an opinion about whether this > specific refactoring is the best way to deal with this case, but > I definitely feel that we mustn't allow the situation to persist. This one is my fault, so I'll take care of it. Splitting the values of the wait classes into their own header makes sense, but the header name wait_class_constants.h sounds a bit off. Why not a simpler "wait_classes.h" that gets included by wait_event.h and wait_event_types.h? -- Michael --Sr1M8wF/ywytFm6j Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmgMjoAACgkQnvQgOdby QH2JuQ/7BkH3pMaTWM+V2qAzqQM9ba7jSSC/Eyr50zorzKXBA15yEMCyG/NN9gh7 KIxqjeyDFY1NDHB7ARr1osDyWFBYHCZ48iyAewtdeJL4Ak/a4G83ZIJyzv55Dcce l1Mie1Ed5+aLcDIuUmoSLwghibYWgOeif/cANTLKUwtLQnChB9epBLMmgICsWZFO zZK15WEnBfGOrZ3L+BmSaH8SiKPsOLCEg5X5q1sEKOSm0kUtfAGtF7Q+RGkuV/sT Gh+4i2pW4QqnJD8cBmAKPsDtOiP3BbyM95bJ67nblJHNB5z8WP/bH0hSthQSwtOz CRfH//J6DkBye6xRzuLgDqVIxY0aSK6W2NAEKZBOfe8XhWvn9yVf64YnVVq4vDxP fGv2FT0a+l4rgfMx1c8i2xqyh+NHvLPp3E0UHGTVsZdEciA+D7ue6RB7W1bgM+cf RbwyasfUOIrAVDKhwZQ4Igi33gfDPkx5M5JeiVesmUJDIsPR3HxZLc9tmR3MXI/Y DEzi2gPVaM83M0sbtigimZWSZsUeNN0leQjuBYT0Gm72Lc69pYWASbKipSkNr1QQ mVwscVki/uTQ9R9m0b/W6JInYAQmXYXn8uS1oYuaIm0eeOHkCLIG5iBFwd4zqSvM C7/REYRXMx9DAFu636vD+KW67zcfjD+VsMKaWuWa53hwM2t2M5s= =JlOk -----END PGP SIGNATURE----- --Sr1M8wF/ywytFm6j--