Re: Set arbitrary GUC options during initdb

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Set arbitrary GUC options during initdb
Date: 2023-03-22 17:04:35
Message-ID: 1527904.1679504675@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> writes:
> This patch looks good to me. It's a very nice simplification of the
> initdb.c code, even without the new feature.

Thanks for looking!

> I found that the addition of
> #include <ctype.h>
> didn't appear to be necessary. Maybe it was required before
> guc_value_requires_quotes() was changed?

There's still an isspace() added by the patch ... oh, the #include
is not needed because port.h includes ctype.h. That's spectacularly
awful from an include-footprint standpoint, but I can't say that
I want to go fix it right this minute.

> I would remove the
> #if DEF_PGPORT != 5432
> This was in the previous code too, but now if we remove it, then we
> don't have any more hardcoded 5432 left, which seems like a nice
> improvement in cleanliness.

Hm. That'll waste a few cycles during initdb; not sure if the extra
cleanliness is worth it. It's not like that number is going to change.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-03-22 17:14:09 Re: allow_in_place_tablespaces vs. pg_basebackup
Previous Message Andres Freund 2023-03-22 17:04:19 Re: CREATE DATABASE ... STRATEGY WAL_LOG issues