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.96) (envelope-from ) id 1vvdln-00BUac-1Q for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Feb 2026 15:59:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vvdlm-00DrMH-0r for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Feb 2026 15:59:18 +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.96) (envelope-from ) id 1vvdll-00DrLx-30 for pgsql-hackers@lists.postgresql.org; Thu, 26 Feb 2026 15:59:17 +0000 Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vvdli-00000001K7q-40nf for pgsql-hackers@postgresql.org; Thu, 26 Feb 2026 15:59:17 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 9299CEC064A; Thu, 26 Feb 2026 10:59:15 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Thu, 26 Feb 2026 10:59:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm2; t=1772121555; x= 1772207955; bh=LxnFPQdJfTDY/leoanTD2B/w/oNFSz6jYaEHLS7K4rA=; b=Y USwPf/kHlrlwZCT11LIR71h75COqPCORMQVk6hwRRB03nrNCgNiG9Kaj081J5qVa nd8iK/laSFQ1YN9A5wcrCgBM70kVlHPJpaacA0SO0ixMGHbzCBqf4MeG5TIRFCpq H67NsnRnHLOyZU+2PWa6PM04HpADJWIVg1yKx1z7KBkVj6A4zru9WZ6ijdBnSyoM C2BYqQZnFY1BsnFw1JhXXyvSGrG43NcUn+OHLqa3UoKF4QqVDZgofM1Vv8VvGf63 o7maVqEQSUCUwQwFIF5/MLYn4hOuysf+0tnrAK1lSOFLjBtA+7p4SE0Rg08ffz+/ dM+azZJg2V9pol2Vhd3gg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1772121555; x=1772207955; bh=L xnFPQdJfTDY/leoanTD2B/w/oNFSz6jYaEHLS7K4rA=; b=pCGS72CCCQufBQv47 knWNdw7Z3MVVCagPHmX1a1D8Ma8bzWUhSGSNWd/Z5irrirlC0wuTSxTfL+EYRpwX MTgqXndUC21hssltGB/GNbdnC+DtgSsvjs6fQeAB6P1LnkVZAZbWBcHrTFzZcINx xK59kuCUHtcAn2pw+14EHizmGTZCZ33rC6LCiz+M+JJACZO5J0+sPjWuI/TmrgLv 2UF1nPQFmePLqDS8xJYwc0/vH3QT39uZy9aqtt4XBhgTotP4DmTMWMinBjJCpYIl L+iIRc7zSzOBuDdMBQYXDxXfr6+s+KXOoyuTyMGFb+SZi5etoZnDYn/7oe41mDu2 gTfxQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvgeeigeeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeeiheehkeekleegueeifedvffegtddugeffheehfeeftdduhfdtkeef leelkeffjeenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopegrnhgurhgvshesrghnrghrrgiivghlrdguvgdprhgtphhtthho pegrmhhithdrkhgrphhilhgrudeisehgmhgrihhlrdgtohhmpdhrtghpthhtohephhhlih hnnhgrkhgrsehikhhirdhfihdprhgtphhtthhopehmihgthhgrvghlsehprghquhhivghr rdighiiipdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqh hlrdhorhhg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Feb 2026 10:59:14 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1772121552; bh=ft/j8u/fygNeolR1xj4f2K1VZxwHdxh9NWArM5zE1u0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=QQNXm1Mdtontn0gcBCqhB2mTif/fwTi/QTIbfWI0YihCVbjT0GcpFjNlIZFnbWhTi wseUxAm4cCSK0xRwxsdaOU/xuVJ/pswFwb2BNWEXjUhI3bVjvYQuYI8vaAWTyvPTvO JQx97eQuYSEnG/K3E7FCCKJJHH1n2S2ak0If0XYJd3BXqkPh/k4NJXCcgvLRWOiMGv NGbpRQFlGTXPjEBGUey+A7Ypcpcy2tER4m0iUtSGjbJZHl8vheypmgkinJZIGXajzZ QYPQQE+YmrXv8+fsjO0HG2tdcbTIh7zvlRKmROtXDWVFCqzqf7uHsk4E6pLVpgvyAn LiRCtvP65YYxg== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 9EDD67A; Thu, 26 Feb 2026 16:59:12 +0100 (CET) Date: Thu, 26 Feb 2026 16:59:12 +0100 From: Alvaro Herrera To: Andres Freund Cc: Heikki Linnakangas , pgsql-hackers@postgresql.org, Amit Kapila , Michael Paquier Subject: Re: pgstat include expansion Message-ID: <202602261523.yu3fs2tpzszl@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <55orfweo3sys7g5vstb3ufv7es2fxyi2tj7rrfwn4okasay5hw@eiktf4jpwnnz> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Feb-26, Andres Freund wrote: > On 2026-02-26 14:52:10 +0100, Alvaro Herrera wrote: > > This one removes wait_event.h from pgstat.h. The only difference from > > the previous one, aside from the fact that I had to add pgstat.h to a > > few more .c files, is that xlogreader.c needs to include it inside the > > #ifndef FRONTEND; otherwise, "ninja -t missingdeps" complain about the > > file being used in pg_rewind and pg_waldump (seen in CI). > > I'm somewhat worried about the amount of breakage this will cause in > extensions. Many extensions use something like > WaitLatch(wait_event_info = WAIT_EVENT_EXTENSION) > and many of them won't have included wait_event.h. Yeah, I considered that, and instead of breaking these, to include wait_event.h in latch.h. This sounds a very reasonable thing to do. But then I searched for other headers that have a wait_event_info parameter in one of their functions, and if we force those to also acquire wait_event.h, then the pollution is much worse than if we just leave it in pgstat.h. (condition_variable.h, fd.h, proc.h, barrier.h). The problem is that some of those headers are in turn being included by others; most notably condition_variable.h is used in execnodes.h and others, and that makes a huge mess. (And it can't be removed.) However, maybe we can just not be so principled about it, add it to latch.h, and then we don't break the whole world. I'll try that. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Finally, the phrase, 'No one was ever fired for buying an IBM' I don't believe has ever been translated into German." (Leonard Tramiel)