![]() Verify with ps that the pid is that of a postgres postmaster. Note down the number on the first line, which is the pid of the postmaster. It is highly likely that you will experience conflicts down the track unless you uninstall the other older version of PostgreSQL.Ĭat /usr/local/var/postgres/postmaster.pid You will then be able to start a new server in the datadir against the freshly initdb'd data. Kill the postmaster (do not use kill -9, just an ordinary kill will do) and the rest will shut down too. You can't use pg_ctl to shut the server down like normal because you've deleted the cluster datadir, so you must simply kill the processes. So you now have some orphan PostgreSQL server processes that are managing data files that've been deleted, so they're no longer accessible in the file system and will be fully deleted when the last open file handle to them is closed. You already had PostgreSQL installed, and you deleted the data dir without stopping the running server. Public service announcement: never delete postmaster.pid. Now when I look at my Activity Monitor I can see 6 instances of postgress. HINT: Is another postmaster (PID 13731) running in data directory "/usr/local/var/postgres"? So, I ran that command and got: postgres -D /usr/local/var/postgresįATAL: lock file "postmaster.pid" already exists You can now start the database server using: So, I rm -rf the postgres folder and ran it again: initdb /usr/local/var/postgres -E utf8 With an argument other than "/usr/local/var/postgres". The directory "/usr/local/var/postgres" or run initdb If you want to create a new database system, either remove or empty Initdb: directory "/usr/local/var/postgres" exists but is not empty The default text search configuration will be set to "english". The database cluster will be initialized with locale "en_US.UTF-8". ![]() This user must also own the server process. I ran initdb /usr/local/var/postgres -E utf8 but got this: The files belonging to this database system will be owned by user "atal421". I just reinstalled postgres via brew install postgres ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |