HOW TO UNDERESTAND ON WHICH PORT IS MY POSTGERSQL IS RUNNING code example Example: how to check port number for postgresql SELECT * FROM pg_settings WHERE name = 'port';