citusdata / pg_cron

Run periodic jobs in PostgreSQL
PostgreSQL License
2.89k stars 193 forks source link

Default value for cron.host #315

Closed sjmiller609 closed 7 months ago

sjmiller609 commented 8 months ago

Is it possible to default cron.host to the value of the postgres configuration unix_domain_socket instead of defaulting to the default path /var/run/postgresql/? This would allow cron to connect by default in more scenarios, and I believe it would have no change on the existing behavior for those who use the default path for unix_domain_socket and did not configure cron.host.

Perhaps that information is not available when the background worker is starting, but I do not know. Please let me know what you think, and thank you in advance.

marcoslot commented 7 months ago

The default value of cron.host is localhost. I'm guessing a lot of installations would break if we switched to unix domain socket by default.