10

I have installed Postgres.app from here (http://postgresapp.com) a couple of days ago. It comes with Postgres 9.4.4.

Today I realised that the software I am using officially supports only Postgres 9.3. The 9.4.4 version works, but sometimes there are DB locks.

Is there a way to downgrade my current db (very small in size, created just for testing), which is version 9.4.4 to 9.3? Or is it possible to create another DB with version 9.3 without uninstalling current version of Postgres.app?

OS: OS X Yosemite 10.10.4

Thank you.

4
  • "but sometimes there are db locks". Details? Commented Jul 5, 2015 at 23:30
  • yes, you can install 9.3 in parallel, then make pg_dump (use 9.3 binaries) and psql to a 9.3 db... Commented Jul 6, 2015 at 6:02
  • For the whole day yesterday there was not a single DB lock, so I don't have any logs. Commented Jul 7, 2015 at 6:27
  • @VaoTsun is there an article or something so I could follow the steps? I am not an expert in DBs, so the words you wrote doesn't have meaningful steps for me. Commented Jul 7, 2015 at 6:29

2 Answers 2

7
  1. install postgres 9.3 server and client to your mac
  2. run locate initdb expected in /Library/PostgreSQL/9.3/bin/initdb let's assume it is there
  3. create 9.3 instance /Library/PostgreSQL/9.3/bin/initdb -D /new_data_directory
  4. export 9.4 db /Library/PostgreSQL/9.3/bin/pg_dump -U 94_username -d 94_database >somefile.dmp
  5. shutdown old /Library/PostgreSQL/9.4/bin/pg_ctl stop -m fast
  6. startup new /Library/PostgreSQL/9.3/bin/pg_ctl start 7.create 93 db /Library/PostgreSQL/9.3/bin/psql -U 93_superuser_user -c "create database IMPORT_DB"
  7. import 93 db /Library/PostgreSQL/9.3/bin/psql -U 93_superuser_user -f somefile.dmp IMPORT_DB

I don't know if there are articles on this topic. I know I sound old fashion, but maybe manuals? :) and experience

Sign up to request clarification or add additional context in comments.

Comments

0

If you need to downgrade the Postgres version but prefer to continue using Postgres.app, there are previous releases recorded at https://github.com/PostgresApp/PostgresApp/releases/ including links to the dmg or older zip installers.

For example in August 2017 the current Postgres.app (v2.0.4) uses Postgres version 9.6.4. However if you needed say Postgres 9.6.2 you could page back through the previous releases to find that the v.2.0.2 release from Feb 2017 uses Postgres 9.6.2. https://github.com/PostgresApp/PostgresApp/releases/tag/v2.0.2

Older versions of Postgres are there too even back to the 9.3 series referenced in the original question.

I'm not sure if the old installers are "officially" provided by Postgres.app. I couldn't find any mention of them on http://postgresapp.com/. Just noticed the releases history on Github.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.