question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PostgreSQL update during pgcli installation via Homebrew

See original GitHub issue

Description

Hi there,

I discovered pgcli yesterday and gave it a shot (like it so far). I installed it via Homberew and unfortunately it seems that Homebrew also updated Postgres during the installation process. I can not start the Postgres server with my existing database files anymore. PostgreSQL server log says:

FATAL:  database files are incompatible with server
DETAIL:  The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.6.3.

I’ve checked my /usr/local/bin directory - the timestamps of the pgcli and postgres symlinks are equal, whereas Python related symlinks and all of my other Homebrew installed programs are of an older date. Could it be, that there is a bug in the Homebrew formula and Postgres will be always installed in bundle with pgcli? I couldn’t find the formula for pgcli in this repository and don’t have time ATM to investigate further.

Your environment

macOS 10.12.4 pgcli 1.5.1 PostgreSQL 9.4 yesterday, and 9.6.3 today 🙈 pip freeze says:

backports-abc==0.4
certifi==2016.8.31
click==6.6
Jinja2==2.8
livereload==2.4.1
Markdown==2.6.6
MarkupSafe==0.23
mkdocs==0.15.3
mkdocs-bootstrap==0.1.1
mkdocs-bootswatch==0.4.0
PyYAML==3.12
singledispatch==3.4.0.3
six==1.10.0
tornado==4.4.1
vboxapi==1.0
wheel==0.26.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19 (13 by maintainers)

github_iconTop GitHub Comments

4reactions
ghostcommented, Jun 11, 2017

@lifeiscontent Works for me if I run brew update and tap the formula repo first: brew tap dbcli/tap && brew tap-pin dbcli/tap && brew install pgcli

@j-bennet @tsroten This also installed pgcli 1.5.1 on a machine with Postgres 9.4.5 without updating Postgres itself. Thank you very much for your effort and have a nice week. 😃

0reactions
ruth09commented, Jul 1, 2018

Thanks @pboschmann it just worked for me ! i was facing the same error but lucky i found the solution. Thanks once again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install
The easiest way install pgcli on an macOS machine is to use Homebrew. Please be aware that this will install postgresql if it's...
Read more >
pgcli — Homebrew Formulae
pgcli. Install command: brew install pgcli. CLI for Postgres with auto-completion and syntax highlighting. https://pgcli.com/. License: BSD-3-Clause.
Read more >
How to upgrade PostgreSQL with Homebrew
I'm currently doing some Rails consulting for a company that uses Postgres in their app. After cloning the app to my computer, I...
Read more >
PostgreSQL not running on Mac
Steps to properly install Postgres via Homebrew on MAC : brew install postgres ... Change your postgresql directory according to version in your...
Read more >
Install and Manage PostgreSQL in a Mac with Homebrew
Install the package. This is very straight forward, specially if you have used Hombrew before: brew doctor brew update brew install postgresql ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found