Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
Date
Msg-id 1697751.1599498780@sss.pgh.pa.us
Whole thread Raw
In response to pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
Alvaro Herrera <alvherre@2ndquadrant.com> 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



pgsql-committers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based