If you correctly modify the contents of postgresql.conf, restarting the PostgreSQL server will not change the port it is listening on, you will almost certainly edit the incorrect postgresql.conf.
On other platforms, PostgreSQL places a copy of its default version of postgresql.conf in the data directory. Thus, you can find at least two copies of all configuration files somewhere on your computer - usually one in the directory where the distribution or source was downloaded or uncompressed, and one in the data directory. On your Mac, if you are using version 9.1, the data directory may be
/Library/PostgreSQL/9.1/data/
Check for postgresql.conf. If you find it, consider making a copy to replace the one you edited. (So ββthe one you edited will again be an unedited version.)
Mike Sherrill 'Cat Recall'
source share