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