Re: Add parallelism and glibc dependent only options to reindexdb

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Daniel Verite <daniel(at)manitou-mail(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Kevin Grittner <kgrittn(at)gmail(dot)com>
Subject: Re: Add parallelism and glibc dependent only options to reindexdb
Date: 2019-07-22 15:33:01
Message-ID: 20190722153301.GA23276@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-Jul-22, Julien Rouhaud wrote:

> On Mon, Jul 22, 2019 at 5:11 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> >
> > > I considered this, but it would require to adapt all code that declare
> > > SimpleStringList stack variable (vacuumdb.c, clusterdb.c,
> > > createuser.c, pg_dumpall.c and pg_dump.c), so it looked like too much
> > > trouble to avoid 2 local variables here and 1 in vacuumdb.c. I don't
> > > have a strong opinion here, so I can go for it if you prefer.
> >
> > Can we use List for this instead?
>
> Isn't that for backend code only?

Well, we already have palloc() on the frontend side, and list.c doesn't
have any elog()/ereport(), so it should be possible to use it ... I do
see that it uses MemoryContextAlloc() in a few places. Maybe we can
just #define that to palloc()?

(Maybe we can use the impulse to get rid of these "simple lists"
altogether?)

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dagfinn Ilmari Mannsåker 2019-07-22 15:37:18 Re: Cleaning up and speeding up string functions
Previous Message Julien Rouhaud 2019-07-22 15:23:30 Re: Add parallelism and glibc dependent only options to reindexdb