Re: ldapi support

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ldapi support
Date: 2018-02-12 13:47:55
Message-ID: 155fedd6-edb8-6550-67fa-695e3eb9af7a@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/10/18 19:46, Michael Paquier wrote:
> On Fri, Feb 09, 2018 at 08:44:38PM -0500, Peter Eisentraut wrote:
>> Hmm. I think the ldap test suite should be changed to use
>> $node->restart instead of $node->reload, so we can be sure that the
>> various pg_hba.conf lines are actually accepted. It appears that doing
>> so wouldn't impact the run time significantly.
>
> Does this mean that some portion of LDAP cofiguration cannot be
> reloaded? It seems backwards to me to not test that.

Well, my mistake was that some part of my newly proposed pg_hba.conf
test snippet did not load and the test did not recognize that.

What we currently do is effectively something like

echo 'xxx' >pg_hba.conf
pg_ctl reload
test1 try to connect

echo 'yyy' >pg_hba.conf
pg_ctl reload
test2 try to connect

But if for some reason 'yyy' is not accepted, the reload will log an
error message and leave the 'xxx' configuration in place. So then the
test2 will run against a configuration that was not meant for it.

My proposal is that we instead write

echo 'xxx' >pg_hba.conf
pg_ctl restart
test1 try to connect

echo 'yyy' >pg_hba.conf
pg_ctl restart
test2 try to connect

Here, if 'yyy' is not accepted, the restart will error out, the test run
will fail, and we'd know something is wrong.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Verite 2018-02-12 14:33:41 Re: csv format for psql
Previous Message Daniel Verite 2018-02-12 13:46:41 Re: csv format for psql