From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based |
Date: | 2020-09-07 17:34:38 |
Message-ID: | 20200907173438.GA10427@alvherre.pgsql |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-09-07 17:58:40 | Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based |
Previous Message | Tom Lane | 2020-09-07 17:13:00 | Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based |