background preloader

Psql issues

Facebook Twitter

Springversion

Common PostgreSQL Errors. By Frank Wiles Below is a resource I've put together for newer PostgreSQL database users.

Common PostgreSQL Errors

Listed are some of the most common error messages you may encounter. While the error messages do in fact tell you exactly what is causing the problem, I find that users often don't know what next steps to take in resolving the issue. If you there is a common error you would like me to include in this list or you find anything inaccurate on this page, please drop me an E-mail at info@revsys.com. List of Errors Error: psql: FATAL: database "root" does not exist Common Cause: A database named 'root' does not exist on your system This error trips up new PostgreSQL users quite often. If you are setting up your database for the first time, you will need to become the PostgreSQL user ( typically 'postgres' ) which can be accomplished by either: logging in as that user su'ing to root and as root su'ing to the postgres user Common Cause: The postmaster or PostgreSQL's server daemon process is not running.

OS X: How to View Log Files. If your OS X system is acting flakey, checking out the log files is a great place to start your exploration of what is going wrong.

OS X: How to View Log Files

Here is where to find your log files in OS X. Like most operating systems, OS X has a ton of stuff running that is hidden to the user. Examining the constantly updated log files is a great way to tune and debug your system. The quickest way to get started is by opening the Console application found in OS X 10.5 and later. This can be found through Spotlight or through the Applications -> Utilities folder.

Tens of hundreds of log files will be visible. System.log describes issues regarding your whole system. Mail.log is occasionally useful when trying to get the Mail application straightened out. CrashReporter logs are very important in debugging any crash within a specific application. This is just a few of the log files that are being updated currently on your system right now. About David Kirk. Macosx - How to restart postgres on OS X? Moncefbelyamani. TL;DR If you’ve just upgraded Postgres with Homebrew and Postgres won’t start, as long as you don’t care about any data stored locally, remove all versions of Postgres (brew remove --force postgresql), delete the /usr/local/var/postgres/ folder, then reinstall Postgres.

moncefbelyamani

I’m currently doing some Rails consulting for a company that uses Postgres in their app. After cloning the app to my computer, I wanted to make sure I had the latest version of Postgres. Before installing or upgrading anything with Homebrew, I always run these two commands first: Once I know everything is up to date and firing on all cylinders, I can get my installs on. In this case, I wanted to upgrade everything I had ever installed with Homebrew. After everything was up to date, I tried to install the DB in the Rails app: That failed with this error message: The next step was to read through Homebrew’s notes about Postgres: I noticed the following: Postgresql - Is the server running on host "localhost" ( ConnectionBad - could not connect to server: Connection refused. Three Battle Tested Ways to Install PostgreSQL.

PostgreSQL is a relational database manager, and it keeps getting more and more popular within the web development community.

Three Battle Tested Ways to Install PostgreSQL

It has taken over from MySQL as the preferred tool for production quality, scalable databases. The rise in popularity is likely due to the backlash from Oracle purchasing and messing with MySQL, Heroku choosing Postgres as the preferred database in production, and Postgres' faster introduction of new features like Arrays and HStore. How to install on - Mac OS X - Windows - Ubuntu How to Install Postgres on Mac OS X This guide will show you how to install PostgreSQL, the easy way, on a Mac. There are a lot of confusing options for installing PostgreSQL. The most popular package manager for Mac OS X, and the one I prefer, is homebrew. If you have MacPorts or Fink installed, this tutorial won't work for you. Open up the Terminal You'll need to use the command line interface to complete many of these steps. Postgres.app – the easiest way to get started with PostgreSQL on the Mac. Osx snow leopard - PostgreSQL error 'Could not connect to server: No such file or directory'

ConnectionBad - could not connect to server: Connection refused. Ruby on rails - Repairing postgresql after upgrade to OSX Mavericks. Ruby on rails - psql: could not connect to server: Connection refused Is the server running on host "localhost" ( Psql cant connect to PostgreSQL server (postmaster) on IP and port 5432?