Is there a way to fix this problem with my PostgreSQL database/server?
-
I seem to have had PostgreSQL version 9.1 installed on my Mac (maybe it was included automatically). However, after I updated to 9.2.3, i got this error in the logs. I can't figure out from the docs what I should do in this situation from the logs FATAL: database files are incompatible with server DETAIL: The data directory was initialized by PostgreSQL version 9.1, which is not compatible with this version 9.2.3. These are the full logs LOG: database system was shut down at 2012-02-27 19:18:09 PST LOG: autovacuum launcher started LOG: database system is ready to accept connections LOG: received fast shutdown request LOG: aborting any active transactions LOG: autovacuum launcher shutting down LOG: shutting down LOG: database system is shut down LOG: database system was shut down at 2012-02-27 21:30:56 PST LOG: autovacuum launcher started LOG: database system is ready to accept connections FATAL: role "shawsome" does not exist FATAL: role "shawsome" does not exist FATAL: role "shawsome" does not exist ERROR: role "myname" already exists STATEMENT: CREATE ROLE MYNAME PASSWORD 'md5b42169a737cea337fe663aa9fbb1df19' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN; WARNING: pgstat wait timeout WARNING: pgstat wait timeout WARNING: pgstat wait timeout LOG: database system was interrupted; last known up at 2012-02-28 21:32:13 PST LOG: database system was not properly shut down; automatic recovery in progress LOG: record with zero length at 0/1714388 LOG: redo is not required LOG: autovacuum launcher started LOG: database system is ready to accept connections WARNING: pgstat wait timeout WARNING: pgstat wait timeout FATAL: database files are incompatible with server DETAIL: The data directory was initialized by PostgreSQL version 9.1, which is not compatible with this version 9.2.3.
-
Answer:
Use http://www.postgresql.org/docs/9.2/static/pgupgrade.html. Different major releases of PostgreSQL (e.g. 9.1 vs 9.2) are usually binary-incompatible. Major releases of PostgreSQL usually add new features that usually change the layout of the system tables, so PostgreSQL 9.2 might require some system tables which are not present in PostgreSQL 9.1 data directory. pg_upgrade allows data stored in PostgreSQL data files to be upgraded to a later PostgreSQL major version.
Hadi Moshayedi at Quora Visit the source
Related Q & A:
- Is there a way to fix home folder permissions remotely?Best solution by Super User
- Is there any problem with the yahoo messenger server in the us, having problems loging in?Best solution by Yahoo! Answers
- Is there still a problem with Yahoo's SMTP server?Best solution by Yahoo! Answers
- How to fix the problem with electric on Honda accord?Best solution by Yahoo! Answers
- How do I fix this problem with my iTunes?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.