4 ms·
I've checked postgres repository and default has been to listen on localhost for at least 15 years. https://github.com/postgres/postgres/blob/master/src/backen
by c2h5oh 6y ago
I've checked postgres repository and default has been to listen on localhost for at least 15 years.
https://github.com/postgres/postgres/blob/master/src/backend/utils/misc/postgresql.conf.sample#L59 https://github.com/postgres/postgres/blob/master/src/backend...
- WaxProlix 6y agoTo be super clear, because it can be less than perfectly obvious, this means on `localhost` but also on loopback. There is no 'real' network device talking to this port.
- dijit 6y agoit also isn't "open"; your username has to match the postgres database username to connect. IE; the 'postgres' unix user is required to access databases as the 'postgres' database user.
- mnahkies 6y agoHmm I think the default pg_hba.conf uses "trust" and so will allow passwordless connections as postgres on localhost, you just have to specify the username (psql will use your username by default) This is the case for the official docker image at least, and I'm fairly certain also true of distro package managers
- deleted 6y ago[deleted]
- boromisp 6y agoAt least on debian / ubuntu, the default is peer auth: https://salsa.debian.org/postgresql/postgresql-common/-/blob/c1bc1fd53edb76a36c05dd71c19fad384e209041/pg_createcluster#L79 https://salsa.debian.org/postgresql/postgresql-common/-/blob...