Use Letsencrypt certificates for Postgresql

You can either add the postgres user to the wheel group or a different group that can have access to the directory /etc/letsencrypt/live/mydomain/ or make the postgres user owner of the certificate (if is used exclusively).

Example command to make the postgres owner to a hypothetical location

sudo mkdir /etc/postgres/
sudo mv /etc/letsencrypt/live/mydomain/com/pg.crt /etc/postgres/pg.crt
sudo mv /etc/letsencrypt/live/mydomain/com/pg.key /etc/postgres/pg.key
sudo chown -R postgres: /etc/postgres

Then you need to adjust the /etc/postgresql/9.4/main/postgresql.conf to point to the new path.