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 1kFKhY-0002c1-08 for pgsql-committers@arkaria.postgresql.org; Mon, 07 Sep 2020 17:13:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kFKhW-0007tQ-Bk for pgsql-committers@arkaria.postgresql.org; Mon, 07 Sep 2020 17:13:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFKhW-0007tI-6N for pgsql-committers@lists.postgresql.org; Mon, 07 Sep 2020 17:13:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFKhT-0004AG-L3 for pgsql-committers@lists.postgresql.org; Mon, 07 Sep 2020 17:13:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 087HD0vJ1697752; Mon, 7 Sep 2020 13:13:01 -0400 From: Tom Lane To: Alvaro Herrera cc: Pavel Stehule , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based In-reply-to: <20200907165844.GA7588@alvherre.pgsql> References: <20200907165844.GA7588@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Mon, 07 Sep 2020 13:58:44 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1697750.1599498780.1@sss.pgh.pa.us> Date: Mon, 07 Sep 2020 13:13:00 -0400 Message-ID: <1697751.1599498780@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2020-Sep-07, Tom Lane wrote: >> I didn't bother tracking down exactly where initdb.c is getting >> stringinfo.h from, but it clearly does import it somewhere in >> our rat's nest of headers. > You can see it here: https://doxygen.postgresql.org/initdb_8c.html > It's through xlog_internal.h (not that it matters much). If there were something to be on the warpath about, it's that initdb is pulling in such an obviously backend-only header as that. I wonder if we should refactor to fix that. Quick experimentation says that the symbols initdb actually needs out of that header are DEFAULT_MIN_WAL_SEGS DEFAULT_MAX_WAL_SEGS IsValidWalSegSize() regards, tom lane