Postgres - FATAL: database files are incompatible with server

后端 未结 7 1963
半阙折子戏
半阙折子戏 2020-12-07 07:20

After restarting my MacBook Pro I am unable to start the database server:

could not connect to server: No such file or directory
Is the server running local         


        
7条回答
  •  爱一瞬间的悲伤
    2020-12-07 08:08

    It happened for me when I was trying to start Postgres12 with postgres11 mounted volume. Just deleting the mounted volume for postgres11 and restart worked for me.

    Previously I was using:

    docker run -d --name my_database -v /Users/champ/postgres:/var/lib/postgresql/data -p 54320:5432 postgres:11
    

    I deleted /Users/champ/postgres and restarted postgres 12, using

    docker run -d --name my_database -v /Users/champ/postgres:/var/lib/postgresql/data -p 54320:5432 postgres:12
    

提交回复
热议问题