From: Michael Paquier <michael@paquier.xyz>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Subject: Re: Allow file inclusion in pg_hba and pg_ident files
Date: Wed, 26 Oct 2022 15:56:07 +0900
Message-ID: <Y1jaB6bYPvxvPL4t@paquier.xyz> (raw)
In-Reply-To: <20221026031948.cbrnzgy5e7glsq2d@jrouhaud>
References: <20220816061030.3xw7emtuxf32qmuk@jrouhaud>
<20220917170612.wnyii63gblsgzane@jrouhaud>
<20221010025132.mmfytfs52l6rvggw@jrouhaud>
<20221024053312.b52456zhzupduouw@jrouhaud>
<Y1Y7L42Ln7HVMWM5@paquier.xyz>
<20221024080303.otukfbx54rwaqznn@jrouhaud>
<Y1eFicewsea5yGRj@paquier.xyz>
<20221025070859.l6eza2ixqfoatodd@jrouhaud>
<Y1fPvQV387X/gVrK@paquier.xyz>
<20221026031948.cbrnzgy5e7glsq2d@jrouhaud>
On Wed, Oct 26, 2022 at 11:19:48AM +0800, Julien Rouhaud wrote:
> That wouldn't be overdoing anymore if we remove the line number / filename from
> the fill_*_line prototypes right?
So, I have spent a good portion of today looking at what you have
here, applying 0001 and 0003 while fixing, rebasing and testing the
whole, discarding 0002 (we could do more for the line number and
source file in terms of the LOGs reported for a regexec failure).
Now remains 0004, which is the core of the proposal, and while it
needs a rebase, I have not been able to spend much time looking at its
internals. In order to help with the follow-up steps, I have spotted
a few areas that could be done first:
- The diffs in guc.h/c for the introduction of GetDirConfFiles() to
get a set of files in a directory (got to think a bit more about
ParseConfigFp() when it comes to the keywords, but that comes to play
with the parsing logic which is different).
- The TAP test, which is half the size of the patch in line number.
Could it be possible to make it more edible, introducing a basic
infrastructure to check a set of rules in pg_hba.conf and
pg_ident.conf without the inclusion logic? Checks for error patterns
(that I agree we strongly lack tests for) look like something we'd
want to tackle independently of the inclusion logic, and it should be
built on top of a basic test infra, at least.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../Y1jaB6bYPvxvPL4t@paquier.xyz/2-signature.asc)
download
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: michael@paquier.xyz, rjuju123@gmail.com, pgsql-hackers@lists.postgresql.org, nathandbossart@gmail.com
Subject: Re: Allow file inclusion in pg_hba and pg_ident files
In-Reply-To: <Y1jaB6bYPvxvPL4t@paquier.xyz>
* 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