Spent much of today installing Postgresql on Ubuntu. Actually, that is not fair, I spent much of the day configuringPostgresql for remote access from a macOS client. So call it post installation server and client configuration.
On the server side, the steps are well documented and straightforward: allow external connections (edit /etc/postgresql/YY/main/postgresql.conf and /etc/postgresql/YY/main/pg_hba.conf where YY = version number of Postgresql, I use nano as an editor) to the server and allow firewall access through the required port (sudo ufw allow 5432/tcp).
Client configuration was a different story. In fairness to the tutorials I was using as a guide, I did have a prior local installation of Postgresql on my machine but that only became a complicating matter later. Issues encountered: 1)I didn’t properly configure postgresql.conf to allow non-localhost access – completely on me, 2)I didn’t understand the error message (seems to be a recurring theme with me), 3)Once 2 was resolved the error message changed, 4)Previously I’d only accessed Postgresql from a client application, command line has different rules and 5)My Postgresql instance was slightly out of date – Homebrew needed an upgrade. Individually none of these issues was difficult to diagnose and resolve, as a group we’re talking multiple hours.