Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pr8sT-00085x-QK for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Apr 2023 02:58:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pr8sQ-00046G-Ti for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Apr 2023 02:57:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pr8sQ-000467-I1 for pgsql-hackers@lists.postgresql.org; Tue, 25 Apr 2023 02:57:58 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pr8sL-004uWH-Ja for pgsql-hackers@lists.postgresql.org; Tue, 25 Apr 2023 02:57:57 +0000 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-51b603bb360so5340859a12.2 for ; Mon, 24 Apr 2023 19:57:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682391471; x=1684983471; h=content-transfer-encoding:mime-version:user-agent:from:subject:to :message-id:date:from:to:cc:subject:date:message-id:reply-to; bh=j97ivb2Cct4XsUbzJ8QlVK/XvlO9X/QOGzjIe6dbjdI=; b=PUsST3LEw59uqhJ+A7ix3zPG7NKJHIvOhVHXZtxe823BZgezgu9+UMW/NABlyjk28q 6m07oDFLbxMFyDagYhXom2V1Zrj9I0tpeHYu+GSnazxi4KUaldhN1o6cTlmbJV6fbEfN mYX+Br+hRfTJo5gp7UmXtahmOKNsX8y7VRjxllvnLFhU2hAbJzGFvgXqXpMhRkp6P2jM 4KCv4t+/WOQKiU8FPiexapTZf6TjGiMOEwBrHnnzfpf+yfwbFADmUhI6jKTan76QCZm7 au66znoj2N0ul5Eq4GOW6l1jl2VlI1BVeixU5orzUyT7wtnZTx8F/LAlb3ceMf3DoBmf JtHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682391471; x=1684983471; h=content-transfer-encoding:mime-version:user-agent:from:subject:to :message-id:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=j97ivb2Cct4XsUbzJ8QlVK/XvlO9X/QOGzjIe6dbjdI=; b=FEVz4Mcj4S8THExOgB/kRuGvk7UtUExjZHwTvcT5IxKgthY+WhARy1NypUGHu5ayDB 8c//S5Hi6oBTL37qoGpVOJ5Sx1M/R24v8tMvdMqSTacTPmxJhX/1+ynrRnRTMdQUJrwz +fV0ZFZzTOdiguooLpYvvIxsBAAmn7oiGqw1w7VMRWL4OJnEHceJbhElMBWAbCtjlpPm dgNr2c5Gy8AD+G2AO3Vv3bQIBm2K1D8Oz2Ll8u4kV+A5V1x0J6V1lCS4H0BMVIjaMNeg /GZmNa6jSZXCYyooY9hDSxEK+fiJPyNQiFx9vKS0H/Mwe/o0jBw3AS1yKIvjrIT+10tR YEWw== X-Gm-Message-State: AAQBX9ftw8gpMNkEAo8PBlOLGY2ZOLezUcVh3l01Jjghc4e+A4UF3u/Z 42xjO4hSh+np+nP9jC5tvYQmY7gwGa0= X-Google-Smtp-Source: AKy350apW7PcJSLatM+PDaPPJmG9ryWaYR6RBT2oQSMbnlifKAlJeaGGnPwdCXDBigDHeGnyb8jpfg== X-Received: by 2002:a05:6a21:6d84:b0:ee:84a2:4ad0 with SMTP id wl4-20020a056a216d8400b000ee84a24ad0mr20992452pzb.22.1682391470954; Mon, 24 Apr 2023 19:57:50 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id s23-20020a634517000000b0051f17e4e1b2sm6770299pga.68.2023.04.24.19.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 19:57:50 -0700 (PDT) Date: Tue, 25 Apr 2023 11:57:48 +0900 (JST) Message-Id: <20230425.115748.2130383825066921512.horikyota.ntt@gmail.com> To: pgsql-hackers@lists.postgresql.org Subject: seemingly useless #include recently added From: Kyotaro Horiguchi User-Agent: Mew version 6.8 on Emacs 27.2 Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Tue_Apr_25_11_57_48_2023_238)--" Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ----Next_Part(Tue_Apr_25_11_57_48_2023_238)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello. While working on a patch, I noticed that a rcent commit (d4e71df6d75) added an apparently unnecessary inclusion of guc.h in smgr.h. The only change made by the commit to the file is the added #include directive, which doesn't seem to be functioning, and the build actually suceeds without it. Moreover, it brings in some server-related stuff when I incluce smgr.h in storage_xlog.h, causing compilation issues for pg_rewind. Should we remove it? Please find the attached patch. regards. -- Kyotaro Horiguchi NTT Open Source Software Center ----Next_Part(Tue_Apr_25_11_57_48_2023_238)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Remove-unnecessary-include.patch" From 75d35c25d4cfaeb6fb40e2d451381beac1d5475c Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date: Tue, 25 Apr 2023 11:43:32 +0900 Subject: [PATCH] Remove unnecessary include The recently added inclusion of guc.h in msgr.h is not necessary and introduces more server-related stuff. Removing the directive helps avoid potential issues with including sgmr.h in frontends. --- src/include/storage/smgr.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/include/storage/smgr.h b/src/include/storage/smgr.h index 17fba6f91a..a9a179aaba 100644 --- a/src/include/storage/smgr.h +++ b/src/include/storage/smgr.h @@ -17,7 +17,6 @@ #include "lib/ilist.h" #include "storage/block.h" #include "storage/relfilelocator.h" -#include "utils/guc.h" /* * smgr.c maintains a table of SMgrRelation objects, which are essentially -- 2.31.1 ----Next_Part(Tue_Apr_25_11_57_48_2023_238)----