pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
11+ messages / 3 participants
[nested] [flat]

* pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
@ 2020-09-06 18:13 Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 04:44 ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Tom Lane @ 2020-09-06 18:13 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Refactor pg_get_line() to expose an alternative StringInfo-based API.

Letting the caller provide a StringInfo to read into is helpful when
the caller needs to merge lines or otherwise modify the data after
it's been read.  Notably, now the code added by commit 8f8154a50
can use pg_get_line_append() instead of having its own copy of that
logic.  A follow-on commit will also make use of this.

Also, since StringInfo buffers are a minimum of 1KB long, blindly
using pg_get_line() in a loop can eat a lot more memory than one would
expect.  I discovered for instance that commit e0f05cd5b caused initdb
to consume circa 10MB to read postgres.bki, even though that's under
1MB worth of data.  A less memory-hungry alternative is to re-use the
same StringInfo for all lines and pg_strdup the results.

Discussion: https://postgr.es/m/1315832.1599345736@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8e3c58e6e459b285d37edb6129e412ed25cd90c1

Modified Files
--------------
src/backend/libpq/hba.c     | 40 +++++++++-----------------
src/bin/initdb/initdb.c     | 12 ++++++--
src/common/pg_get_line.c    | 70 +++++++++++++++++++++++++++++++--------------
src/include/common/string.h |  3 ++
4 files changed, 75 insertions(+), 50 deletions(-)



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
  2020-09-06 18:13 pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-09-07 04:44 ` Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 14:29   ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Pavel Stehule @ 2020-09-07 04:44 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org

Hi

ne 6. 9. 2020 v 20:13 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:

> Refactor pg_get_line() to expose an alternative StringInfo-based API.
>
> Letting the caller provide a StringInfo to read into is helpful when
> the caller needs to merge lines or otherwise modify the data after
> it's been read.  Notably, now the code added by commit 8f8154a50
> can use pg_get_line_append() instead of having its own copy of that
> logic.  A follow-on commit will also make use of this.
>
> Also, since StringInfo buffers are a minimum of 1KB long, blindly
> using pg_get_line() in a loop can eat a lot more memory than one would
> expect.  I discovered for instance that commit e0f05cd5b caused initdb
> to consume circa 10MB to read postgres.bki, even though that's under
> 1MB worth of data.  A less memory-hungry alternative is to re-use the
> same StringInfo for all lines and pg_strdup the results.
>
>
I tried  to reuse this new API in pg_dump.c, and I had a problem with
private struct StringInfo.

Inside initdb.c there is a access to this structure via #include
"access/xlog_internal.h" and it is little bit unreadable

maybe there should be included directly with #include "lib/stringinfo.h" ?

Regards

Pavel




> Discussion: https://postgr.es/m/1315832.1599345736@sss.pgh.pa.us
>
> Branch
> ------
> master
>
> Details
> -------
>
> https://git.postgresql.org/pg/commitdiff/8e3c58e6e459b285d37edb6129e412ed25cd90c1
>
> Modified Files
> --------------
> src/backend/libpq/hba.c     | 40 +++++++++-----------------
> src/bin/initdb/initdb.c     | 12 ++++++--
> src/common/pg_get_line.c    | 70
> +++++++++++++++++++++++++++++++--------------
> src/include/common/string.h |  3 ++
> 4 files changed, 75 insertions(+), 50 deletions(-)
>
>

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
  2020-09-06 18:13 pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 04:44 ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
@ 2020-09-07 14:29   ` Alvaro Herrera <alvherre@2ndquadrant.com>
  2020-09-07 14:48     ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 11+ messages in thread

From: Alvaro Herrera @ 2020-09-07 14:29 UTC (permalink / raw)
  To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers@lists.postgresql.org

On 2020-Sep-07, Pavel Stehule wrote:

> I tried  to reuse this new API in pg_dump.c, and I had a problem with
> private struct StringInfo.

> maybe there should be included directly with #include "lib/stringinfo.h" ?

That's the right thing to do, yes.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
  2020-09-06 18:13 pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 04:44 ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 14:29   ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2020-09-07 14:48     ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 16:34       ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Tom Lane @ 2020-09-07 14:48 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: Pavel Stehule <pavel.stehule@gmail.com>; pgsql-committers@lists.postgresql.org

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> On 2020-Sep-07, Pavel Stehule wrote:
>> I tried  to reuse this new API in pg_dump.c, and I had a problem with
>> private struct StringInfo.

>> maybe there should be included directly with #include "lib/stringinfo.h" ?

> That's the right thing to do, yes.

Yeah, if you want to use pg_get_line_append, you need to include
both those headers.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
  2020-09-06 18:13 pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 04:44 ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 14:29   ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
  2020-09-07 14:48     ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-09-07 16:34       ` Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 16:54         ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 11+ messages in thread

From: Pavel Stehule @ 2020-09-07 16:34 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; pgsql-committers@lists.postgresql.org

po 7. 9. 2020 v 16:48 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:

> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > On 2020-Sep-07, Pavel Stehule wrote:
> >> I tried  to reuse this new API in pg_dump.c, and I had a problem with
> >> private struct StringInfo.
>
> >> maybe there should be included directly with #include
> "lib/stringinfo.h" ?
>
> > That's the right thing to do, yes.
>
> Yeah, if you want to use pg_get_line_append, you need to include
> both those headers.
>

here is a patch

inline patch 1: src/bin/initdb/initdb.c (+1/-0 lines) download inline-1.patchdiff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 37e0d7ceab..0dcc518beb 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -72,6 +72,7 @@ #include "fe_utils/string_utils.h" #include "getaddrinfo.h" #include "getopt_long.h" +#include "lib/stringinfo.h" #include "mb/pg_wchar.h" #include "miscadmin.h"
Regards Pavel > regards, tom lane > ^ permalink raw reply [nested|flat] 11+ messages in thread

* Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
  2020-09-06 18:13 pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 04:44 ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 14:29   ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
  2020-09-07 14:48     ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 16:34       ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
@ 2020-09-07 16:54         ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 16:58           ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Tom Lane @ 2020-09-07 16:54 UTC (permalink / raw)
  To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; pgsql-committers@lists.postgresql.org

Pavel Stehule <pavel.stehule@gmail.com> writes:
> here is a patch

What exactly is this supposed to fix?

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.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
  2020-09-06 18:13 pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 04:44 ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 14:29   ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
  2020-09-07 14:48     ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 16:34       ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 16:54         ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-09-07 16:58           ` Alvaro Herrera <alvherre@2ndquadrant.com>
  2020-09-07 17:00             ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 17:13             ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 11+ messages in thread

From: Alvaro Herrera @ 2020-09-07 16:58 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Pavel Stehule <pavel.stehule@gmail.com>; pgsql-committers@lists.postgresql.org

On 2020-Sep-07, Tom Lane wrote:

> Pavel Stehule <pavel.stehule@gmail.com> writes:
> > here is a patch
> 
> What exactly is this supposed to fix?
> 
> 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).

We do the indirect-header thing all over the place.  There's no point in
trying to avoid it completely.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
  2020-09-06 18:13 pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 04:44 ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 14:29   ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
  2020-09-07 14:48     ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 16:34       ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 16:54         ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 16:58           ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2020-09-07 17:00             ` Pavel Stehule <pavel.stehule@gmail.com>
  1 sibling, 0 replies; 11+ messages in thread

From: Pavel Stehule @ 2020-09-07 17:00 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers@lists.postgresql.org

po 7. 9. 2020 v 18:58 odesílatel Alvaro Herrera <alvherre@2ndquadrant.com>
napsal:

> On 2020-Sep-07, Tom Lane wrote:
>
> > Pavel Stehule <pavel.stehule@gmail.com> writes:
> > > here is a patch
> >
> > What exactly is this supposed to fix?
> >
> > 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).
>
> We do the indirect-header thing all over the place.  There's no point in
> trying to avoid it completely.
>

ok

Pavel


> --
> Álvaro Herrera                https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
  2020-09-06 18:13 pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 04:44 ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 14:29   ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
  2020-09-07 14:48     ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 16:34       ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 16:54         ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 16:58           ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2020-09-07 17:13             ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 17:34               ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
  1 sibling, 1 reply; 11+ messages in thread

From: Tom Lane @ 2020-09-07 17:13 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: Pavel Stehule <pavel.stehule@gmail.com>; pgsql-committers@lists.postgresql.org

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





^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
  2020-09-06 18:13 pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 04:44 ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 14:29   ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
  2020-09-07 14:48     ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 16:34       ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 16:54         ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 16:58           ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
  2020-09-07 17:13             ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-09-07 17:34               ` Alvaro Herrera <alvherre@2ndquadrant.com>
  2020-09-07 17:58                 ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 11+ messages in thread

From: Alvaro Herrera @ 2020-09-07 17:34 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Pavel Stehule <pavel.stehule@gmail.com>; pgsql-committers@lists.postgresql.org

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





^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
  2020-09-06 18:13 pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 04:44 ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 14:29   ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
  2020-09-07 14:48     ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 16:34       ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Pavel Stehule <pavel.stehule@gmail.com>
  2020-09-07 16:54         ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 16:58           ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
  2020-09-07 17:13             ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
  2020-09-07 17:34               ` Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2020-09-07 17:58                 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

From: Tom Lane @ 2020-09-07 17:58 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: Pavel Stehule <pavel.stehule@gmail.com>; pgsql-committers@lists.postgresql.org

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> 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.

> 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;

Yeah, I was thinking along the same lines, but hadn't done the legwork
to see what else is needed by frontend code.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 11+ messages in thread


end of thread, other threads:[~2020-09-07 17:58 UTC | newest]

Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-09-06 18:13 pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Tom Lane <tgl@sss.pgh.pa.us>
2020-09-07 04:44 ` Pavel Stehule <pavel.stehule@gmail.com>
2020-09-07 14:29   ` Alvaro Herrera <alvherre@2ndquadrant.com>
2020-09-07 14:48     ` Tom Lane <tgl@sss.pgh.pa.us>
2020-09-07 16:34       ` Pavel Stehule <pavel.stehule@gmail.com>
2020-09-07 16:54         ` Tom Lane <tgl@sss.pgh.pa.us>
2020-09-07 16:58           ` Alvaro Herrera <alvherre@2ndquadrant.com>
2020-09-07 17:00             ` Pavel Stehule <pavel.stehule@gmail.com>
2020-09-07 17:13             ` Tom Lane <tgl@sss.pgh.pa.us>
2020-09-07 17:34               ` Alvaro Herrera <alvherre@2ndquadrant.com>
2020-09-07 17:58                 ` Tom Lane <tgl@sss.pgh.pa.us>

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