Hi Wilhelm, Currently, Kea does not support multiple database servers directly. This article may be of some use: https://kb.isc.org/docs/experimenting-with-postgresql-high-availability
Thank you, Darren Ankney On Mon, Jun 2, 2025 at 9:21 AM Wilhelm Wijkander <li...@0x5e.se> wrote: > > Hello :) > > I'd like to store my host reservations(and leases/config) in a > high-availability pgsql setup, and I'd like to have Kea(2.7.8) > automatically fail over to a secondary server if the first one doesn't > respond. This should be supported in libpq and seems to be working in > Kea as well(though I'm not sure if it is deliberate as I can't see > this mentioned in the ARM?): > > "hosts-database": { > "type": "postgresql", > "name": "kea", > "user": "kea", > "password": "kea", > "host": "3fff::1,3fff::2", > "port": 5432 > } > > However - I'd like to pass the parameter > "target_session_attrs=read-write" in order to make sure that only the > current r/w primary pgsql server is used, and that r/o secondaries are > not considered. I try passing '"host": "3fff::1,3fff::2 > target_session_attrs=read-write"' in the hosts-database stanza but get > a cryptic error: > > Jun 02 13:02:29 dhcp-server kea-dhcp4[635085]: INFO PGSQL_HB_DB > opening PostgreSQL hosts database: host='3fff::1,3fff::2 name=kea > password=***** port=5432 target_session_attrs=read-write' > type=postgresql universe=4 user=kea > Jun 02 13:02:29 dhcp-server kea-dhcp4[635085]: ERROR > DHCP4_CONFIG_LOAD_FAIL configuration error using file: > /etc/kea/kea-dhcp4.conf, reason: Unable to open database: missing "=" > after "3fff::1,3fff::2'" in connection info string > > Thankful for any help, > Wilhelm > -- > ISC funds the development of this software with paid support subscriptions. > Contact us at https://www.isc.org/contact/ for more information. > > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users. > > Kea-users mailing list > Kea-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/kea-users -- ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users. Kea-users mailing list Kea-users@lists.isc.org https://lists.isc.org/mailman/listinfo/kea-users