Reputation: 966
Everytime I startup the server it seems to completely ignore all configuration settings. My data directory is an external drive, so I use pg_ctl -D /Volumes/Data/Postgres start
to start.
It only accepts localhost connections on port 5432, which I have confirmed by show listen_addresses;
even though the config file has the following under connection settings:
#listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
#port = 9000 # (change requires restart)
I also checked the postgresql.auto.conf file, as apparently this overrides the config file, and its completely empty.
For the record the database has crashed a few times due to power being disconnected/connection issues...but it still works fine it seems because I can connect locally...
Upvotes: 1
Views: 1049
Reputation: 246083
You forgot to remove the #
in the beginning of the configuration file line. PostgreSQL ignores everything from #
to the end of the line.
Most of the postgresql.conf
entries are “commented out” in that fashion. This should serve as documentation: you can see what parameters there are and what the default value is.
Upvotes: 2