> On 16 Jul 2026, at 00:10, Zsolt Parragi <[email protected]> wrote: > >> If you can find a good way to do it without convoluting the testfile which >> currently just does a skip_all in case of LibreSSL, then why not. If it >> reduce >> readability of the test file then it's probably not worth it since it's not >> using any different codepaths from the OpenSSL counterpart. > > Done. I added an if with an early exit instead of the skip, it seems > to work properly with a local LibreSSL build I tested and I think it > looks okay.
Makes sense. + "SELECT count(*) FROM pg_hosts_file_rules() WHERE error IS NULL", One thing I noticed (and had missed before) is that we should SELECT from the view and not the function. >> It also makes more sense to me to first test parsing, and then >> parsing+loading. > > Also done. I also modified the test to use a connection string so that > I don't have to add a trust entry to pg_hba before the connection > tests. LGTM. While at it I think we should take the opportunity to test selecting from the view with the file missing before we populate it and test parsing. It will be a cheap test to add and will cover one more path. One small nit wit the LibreSSL hunk in the patch: ../src/backend/utils/adt/hbafuncs.c:467:1: warning: unused function 'fill_hosts_line' [-Wunused-function] fill_hosts_line(Tuplestorestate *tuple_store, TupleDesc tupdesc, ^ 1 warning generated. With those two small nitpicks addressed I think this patch is pretty much ready for v20. -- Daniel Gustafsson
