Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hsvKf-000563-KO for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Jul 2019 20:36:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hsvKe-0007L8-Bt for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Jul 2019 20:36:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hsvKd-0007L1-Vu for pgsql-hackers@lists.postgresql.org; Wed, 31 Jul 2019 20:36:20 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hsvKa-0007NJ-TW for pgsql-hackers@postgresql.org; Wed, 31 Jul 2019 20:36:19 +0000 Received: by mail-qt1-x844.google.com with SMTP id h21so67836970qtn.13 for ; Wed, 31 Jul 2019 13:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=FybGo62q5vCng4oqlk2MQ1AINJOncur6FG1xHuYpTio=; b=lM9dCMwuHyj6dvdQNpQwjZPIzSnVi46SXjyfq44XbpfYEKxe7BhA1RPis5a290Eo7f 3TBbEWcvmxmpTaTfhYelHvC3RVlzBS7I6z4Zuv6lRxk0L7W2F0sZTZ+BhwJYwgleR7qZ odPLyoRU3jFzDNXyWgldrqyhesFqc/lxA3SgsimHRMHVdQVsCnXkovHPtar7CO1hUIQI iX4h+IfW+SvN7JGf+Wavk3lDUjJLOL8MxupUOnIjUt196hmjQfAq15tkjlAKtD32Uuo+ BQ0kzPNLRYVIdG1hC9Rx1TqSEW2uH21SVxGacFS2VAbgdOxS9cnUedr/gLb39sxQDf0Y PWDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=FybGo62q5vCng4oqlk2MQ1AINJOncur6FG1xHuYpTio=; b=kzXOzDxxGfiV6GaLQt08foT23nvit9j0uGmIXKj3CxCzOGLdDq7XLmR46zZIYk2Y4M GC1HOfGztoHPlRfT/i3GqBWt6CGK3PXT/HDEv0mvuND170e8aSzN1aIpPrNJ3J53Jwhn zGN6mLZmoOHti3PHv0IMAkYZCQnpuWMexqwJIIRGU98skhPfriOnp6z9Vir8B0SkezzU q/DnVLjKhQdvNoxla9/u+p8HEcYZlsqVuu0cZkXNOwHomZwqUX6KGfEAb5Q499ETj+cm lIW0CLIFAwCeUT2WA0UiK1TtwSb2fl51zG4ZeZPZi+ljW4RzNUeFONLDCqJHXOU5nr0K luxw== X-Gm-Message-State: APjAAAUHPUERxou8TMg/7zRTac5TfI3dAQIlJCK0p5YJ5froPiecO6tK ViD9mpZwbj4FwT4+1oinVGgT2g== X-Google-Smtp-Source: APXvYqwZddR690cHMTVUlhaAqpIRGeLkXV4tNgglyYR408jxHupxmUrTu75UjbYB9ZhBGslcbnMY2A== X-Received: by 2002:ac8:2b14:: with SMTP id 20mr90087669qtu.295.1564605374668; Wed, 31 Jul 2019 13:36:14 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([177.154.145.100]) by smtp.gmail.com with ESMTPSA id y194sm31195734qkb.111.2019.07.31.13.36.13 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 31 Jul 2019 13:36:14 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 359F8120999; Wed, 31 Jul 2019 16:36:07 -0400 (-04) Date: Wed, 31 Jul 2019 16:36:07 -0400 From: Alvaro Herrera To: Andres Freund Cc: vignesh C , Pg Hackers Subject: Re: Unused header file inclusion Message-ID: <20190731203607.GA5260@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190731154451.yl6f47n4q3jyjg4r@alap3.anarazel.de> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jul-31, Andres Freund wrote: > IDK, I find the compilation times annoying. And it's gotten quite > noticably worse with all the speculative execution mitigations. Although > to some degree that's not really the fault of individual compilations, > but our buildsystem being pretty slow. We're in a much better position now than a decade ago, in terms of clock time. Back then I would resort to many tricks to avoid spurious compiles, even manually touching some files to dates in the past to avoid them. Nowadays I never bother with such things. But yes, reducing the build time even more would be welcome for sure. > * I think a lot of the interlinking stems from the bad idea to use > typedef's everywhere. In contrast to structs they cannot be forward > declared portably in our version of C. We should use a lot more struct > forward declarations, and just not use the typedef. I don't know about that ... I think the problem is that we both declare the typedef *and* define the struct in the same place. If we were to split those things to separate files, the required rebuilds would be much less, I think, because changing a struct would no longer require recompiles of files that merely pass those structs around (that's very common for Node-derived structs). Forward-declaring structs in unrelated header files just because they need them, feels a bit like cheating to me. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services