I'm trying to set the PostgreSQL pgAgent as a daemon on Ubuntu Server 20.04, but I'm getting the following error and I can't find much documentation about it:
ERROR: Stopping pgAgent: Couldn't establish the primary connection with the database server.
I am trying it in the following way:
pgagent host=/var/run/postgresql dbname=mydb user=mydb
What is this due to or what needs to be done?