On Tue, 11 Feb 2025, Ben Harris wrote

On Mon, 10 Feb 2025, Michael Banck wrote
After bootstrapping the cluster, a patronictl reinit worked (but I do see those 'Use of uninitialized value' warnings):

Yes, that's what I see too. I'll see if I can work out what's different between my production configuration and this test one.

I've worked out what the difference is between our configurations. The standard configuration includes postgresql.parameters.unix_socket_directories. I had removed postgresql.parameters from my configuration because I had overridden the logging settings through the DCS and unix_socket_directories was set to its default anyway. Putting unix_socket_directories back (either in the DCS or in the Patroni configuration file) causes reinit to work again, even with patroni 4.0.4-2.pgdg24.04+1.

I think the problem here is that pg_dropcluster needs to find unix_socket_directories in the PostgreSQL configuration files. If it's specified in Patroni, Patroni will write it into postgresql.conf, and so it will still be available after postgresql.base.conf is deleted. But if unix_socket_directories is not specified in Patroni then it appears only in postgresql.base.conf, and so pg_dropcluster can't find the setting once that file is deleted, and so fails.

I don't know if I should be able to omit unix_socket_directories from the Patroni configuration, but to be on the safe side, I'm going to put it back.

--
Ben Harris, University of Cambridge Information Services.

Reply via email to