From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
Date: Mon, 7 Sep 2020 14:34:38 -0300
Message-ID: <20200907173438.GA10427@alvherre.pgsql> (raw)
In-Reply-To: <1697751.1599498780@sss.pgh.pa.us>
On 2020-Sep-07, Tom Lane wrote:
> 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()
Hmm, if we wanted to clean things up I think we should look at what
other things from xlog_internal.h are being used by other frontend
programs; for example it looks like fe_utils/archive.c is pulling
xlog_internal.h just to get XLOGDIR, while pg_controldata needs just
MAXFNAMELEN, XLogFileName and XLByteToSeg (apart from IsValidWalSegSize).
Maybe there's room for a new header that serves the purpose of working
with WAL segment files.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, pavel.stehule@gmail.com
Subject: Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
In-Reply-To: <20200907173438.GA10427@alvherre.pgsql>
References: <1697751.1599498780@sss.pgh.pa.us> <20200907173438.GA10427@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox