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 1w1g5l-000VdW-2Z for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Mar 2026 07:40:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w1g5i-003pnj-33 for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Mar 2026 07:40:51 +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.96) (envelope-from ) id 1w1g5i-003pnb-23 for pgsql-hackers@lists.postgresql.org; Sun, 15 Mar 2026 07:40:51 +0000 Received: from mail-yw1-x1130.google.com ([2607:f8b0:4864:20::1130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w1g5g-00000000Ejf-0Gcb for pgsql-hackers@lists.postgresql.org; Sun, 15 Mar 2026 07:40:51 +0000 Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-7986d231b3cso63594537b3.1 for ; Sun, 15 Mar 2026 00:40:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773560446; cv=none; d=google.com; s=arc-20240605; b=l1H+OdWYCky3pkuxKEEr93uemvT+VHzpgrnX/tNjth67VTmQYATBP3i/oIRzjb/cn+ Sx4EEU1fs/vXvl6/Zfek2AKDI+EA3doijtPn9JUsYP5S4x3usXbRspA7ILD3l/hWOtas +We0oeoLkwgH3yOrgpk1Fp8nXFaZ9IsStA2NdIK1fCG1XfiOYYTIcY4p+PtKICix12G8 7O8aH0Y2BhX2AwR43ZEtJ9JLHSwQ8rKD+U0szR4C0IxWqttjyCfc426U/LrplZLADO5Y uS4F6kN/m24bIuOEZV7DwtN1pfyndmt83+ADTFt+0dsXUI1HE5nxOGBXGAiELFQ0dyFd sR/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=659Vw4wYN8RSqB1qyCqwLh35I+YVq9yh9SrNYzZ84HQ=; fh=YhmxPC0NYagsxVMppzYMgO0XMWsRSWzMegLjmIklu8U=; b=HXHq5OhV8EwGwLigYgI5XZV28mhr74QffrL6oOVCCy0sd7t8D5vv5HI5tnUaQc5jsY Bd6bkb+W1hPg3oLPqq8JfFdp8ul69z3sHH7ZdgOHkSYoNw2JfAdSXcRnxMDhK4i9+nEf sWFqZzH7VT47SCT/PIvZ7H3Otq/+rtLSNj1Fazv54mqebl4u4o3bKRUM8guwdpo4Zre2 YCRvvD2V7lFDZB2pcSZtyE8JuIBznmLeqUZTtK+LMLm4WbTwkv3h9H1UinWIp79hJ1S0 7fcaaE19wuw//3phxxkIEoAAbqFZ5i6ySvO/cSUolNvgVFSgI9G/TFXhneeEhm3Ik/hD 2zDA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=percona.com; s=google; t=1773560446; x=1774165246; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=659Vw4wYN8RSqB1qyCqwLh35I+YVq9yh9SrNYzZ84HQ=; b=CiSuRUSAwSHBAUmJ9K1SnDZRVsZmp6t76jG7IUpDYhopl5XyUrxR1OK42fY2+2v6bM uc83p4rbHM6PwqT+BgGvBZkbasliHcR+gVkLAMNCr+YrrwM4SmIAaa7ifVEx2uODUHI8 heHwRIVVepBMyptfsUUWOmGZY3rYvXiaBuRsY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773560446; x=1774165246; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=659Vw4wYN8RSqB1qyCqwLh35I+YVq9yh9SrNYzZ84HQ=; b=dWIDiqBbKQFR2glIeP1Ij2yWoAuqXlLt8FRFRv03i9MrUUVsqznx0k5PV1KkytdRSS W/zWpD3MCy9wSF1B53GbEpnNtDVBlGh/sq8i9OB6c0N/PkSko5qt30HLLHMZXutgBlOk b7x516RyTYIFB3JtS7nPYiFW+Q40w0h2I3zzduigQVGJLDA5SJm8NRfX7KyT7OoDmx7r qGjamdIXmoY+zFdArozdr0T0gbe04hAzui3mnO46PpzHJUWJcEe1FHG8+gA5+cYYz/1q FkZbpE3mfajn7tw6e9SJAss1QkekLWIskdViWoVWx4tjg0d5sWkN8Qdq/yxbchjuL/Dk XG+g== X-Gm-Message-State: AOJu0YxyIddFVxsftrSJhoJyck84Id0aCaif+cpNkIZmv4OjdeEOylEx 5BEVyKuc7bWicosoxeJRQssBGMQIrcPUajCdUiXcm8plC8UIOGkT2qSpUrRDmZTrBppOQhGBvhp +ogGZxFrAFSUFQ3N8lY0ViJMMEcBQ98t79pvoOae9bVUzNvbV1UIt1Dp8Zfb5XXBX83cp4CVL/a rgoRHBzIindGoRAJbC+OguMpXH09Ylc23fPTu/3yOma9cIXPR/NbOtE9xBF492Z9nYu+nKKW+wG wAUXatVMHpwRayiVsGktku7nAeHU/KtpY/wj0820MIw7y5UIO4UY6jewDzRVTn4xXhgftV7tqPW iOzAT68= X-Gm-Gg: ATEYQzy+s58fQgzIaIMUuwK0sYD0TU4ZhcOsnWqMCaEipd3L84h3mtT0SJDsOZF1xDu 36pL+ID/Hc7VbscWzI3QXzgsO582glrRRQnrFS2vGNZ0tagMb84YOBd44InUkrEYEmSTvmVkrg1 WRfKKLa6PNs5pKq7QRa/JXYFTSbuW7K5RjHuuQ5Gpu7Nefom76Sh6jOfvSpjPkvG+yM+lkZ0qDR 3AIfwXZRZGAGA090+g4Xhy4jJ9beRVr/yuDuiq7KX9zmOfDjgXp7Zojq1RHDOUJ/g/RQCKj/kpF SJ2ZzzybGJV16Zbp2VLvNh9uNRdjAicHg4ud3+1fPmOQ7ybJvnLxJLNovsabbGiT7sCLbqyvK5K ivOI= X-Received: by 2002:a05:690c:e3c4:b0:799:1913:1157 with SMTP id 00721157ae682-79a1bcd2766mr86068287b3.16.1773560446373; Sun, 15 Mar 2026 00:40:46 -0700 (PDT) MIME-Version: 1.0 References: <1910768.1773533329@sss.pgh.pa.us> In-Reply-To: <1910768.1773533329@sss.pgh.pa.us> From: Zsolt Parragi Date: Sun, 15 Mar 2026 07:40:38 +0000 X-Gm-Features: AaiRm52bOWxtTgXt-Rz3xoZSo6KuekkwxYS5sa4gK0DoJhAnoal0QuhDnslt9Vg Message-ID: Subject: Re: Proposal: common explicit lists for installed headers To: Tom Lane Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" X-CLOUD-SEC-AV-Sent: true X-CLOUD-SEC-AV-Info: percona,google_mail,monitor X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > I think you've chosen the worst-common-denominator > solution. There is nothing to like about an explicit list of > installed files. This is a difficult and very opinionated question. Personally, I like to use CMake's glob_recurse + configure_depends even for C/C++ source files in my small personal projects for simplicity, so I completely understand and somewhat agree with your point. In practice however, both Meson[1] and CMake[2], the two most popular build systems, actively discourage any type of globbing/automatic file discovery magic, and they have good reasons for doing so. The main problem with it, which was also why Andreas Freund suggested doing this in the headerscheck thread is that this breaks dependency resolution: if a new header file appears, that won't result in a build script change, which means that the build system won't pick it up. It won't get installed, it won't get verified by headerscheck, etc. This means that it can: * lead to CI failures/misses * lead to developers missing build errors locally, wasting CI time * break git bisect The workaround for it (e.g. cmake's configure_depends) is to instead of running the glob expression / git ls-files / etc during configure time, run it for every build invocation. That's fine on fast NVMEs, terrible on spinning disks / slow fs with large projects like postgres. > that we will sometimes forget to add some new header to the list. > We won't notice such omissions until some end user complains, > maybe years later. This already happens, I just submitted a patch for a fix like this yesterday, which I noticed while working on this [3]. We only use glob/add_subdir for some directories, not all of them. The current behavior is inconsistent, and because of that, it is easier to miss. I think having a clear rule, and following it everywhere would improve things. > At least for me, > git ls-files 'src/include/*.h' > seems to produce a pretty usable list of server headers. I was thinking about adding a configure-time step that verifies the files: during configuration, it checks if we missed any headers (e.g. they are not in the list files), and reports an error. Still keeping the explicit requirement, but adding a guardrail - also, CI would fail quickly if something is missed. For now I left it out to: a. keep the first patch simpler b. keep things consistent, because while this is true for src/include, it's not true for the other directories, we do not install all header files from those (e.g. src/interfaces/libpq). If I wanted to add automatic checks there, I would have to also add exclude lists. [1]: https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard [2]: https://cmake.org/cmake/help/latest/command/file.html#filesystem [3]: https://www.postgresql.org/message-id/CAN4CZFP6NOjv__4Mx%2BiQD8StdpbHvzDAatEQn2n15UKJ%3DMySSQ%40mail.gmail.com