Nixos/patroni: question about using patroni as user to run postgres

Hi.
I have a question regarding defaultUser/defaultGroup in file nixos/modules/services/cluster/patroni/default.nix.

I wonder if there is a particular reason to set those to patroni/patroni. Because it seems to me that, in this case, it requires a bunch of additional changes to operate postgres “as usual”.

Also, from what I see in patroni/patroni, I am not sure that user patroni should be preferred over postgres for the user to run both.

Am I missing something?

Thanks.

1 Like

Hello Laurent,

I can’t say I recall any particular reason, maybe I saw it setup like that somewhere else.
It was a few years ago, I don’t quite remember.

Your remark makes sense, in fact, I set the user and group to `postgres` in my own configs.

The default could be updated, but we need to be careful not to break anyone’s current config.

1 Like