Code Monkey home page Code Monkey logo

postgresapp's Introduction

Postgres.app

The easiest way to run PostgreSQL on your Mac

  • Includes everything you need to get started with PostgreSQL
  • Comes with a pretty GUI to start / stop servers
  • Run multiple versions of PostgreSQL simultaneously

Download

You can download recent versions of Postgres.app from the Postgres.app website.

Older versions and pre-releases are available in the releases section on GitHub.

Documentation

Documentation is available at http://postgresapp.com/documentation, as well as from the "Open Documentation" menu item in Postgres.app.

What's Included?

How To Build

Postgres.app consists of separate parts:

  1. The PostgreSQL binaries, including extensions and a bunch of command line tools. You can find the binaries in /Applications/Postgres.app/Contents/Versions

  2. The Postgres.app user interface, written in Swift. This is the native Mac app that you see when you double click Postgres.app in the Finder.

For compatibility reasons we build the different parts on different versions of macOS.

  • the binaries for PostgreSQL 12 are built on macOS 10.12 with Xcode 8.3.3

  • the binaries for PostgreSQL 13 are built on macOS 10.15 with Xcode 11.7

  • the binaries for PostgreSQL 14 are built on macOS 11 with Command Line Tools for Xcode 12.5

  • the binaries for PostgreSQL 15 - 16 are built on macOS 12 with Command Line Tools for Xcode 14

  • the GUI is built on macOS 14 with Xcode 15.0.1

It is of course possible to use other versions of macOS / Xcode (see details below), but those are the environments we use.

Building the GUI

If you want to work on the user interface only, you don't have to re-compile the binaries yourself. By default, the buildscript for Postgres.app just copies the binaries from /Applications/Postgres.app/Contents/Versions

So just make sure you have a copy of Postgres.app in your applications folder. Open the XCode file and start hacking!

Tools required for building the GUI:

  • Xcode 11 or later (Swift 5 support is required)

Building the Binaries

If you want to build your own versions of all the PostgreSQL binaries, you have slightly more work to do.

The directories src-xx each contain a makefile that downloads and builds all the binaries. If you have all the prerequisites installed (see below), you can just type make.

The makefile will download and build many gigabytes of sources. The default target (all) builds postgresql, postgis, wal2json, pldebugger, plv8 (till PostgreSQL 13), pgvector (starting with PostgreSQL 15) and pgrouting (starting with PostgreSQL 15). PostGIS and especially plv8 with all their dependencies take a long time to build, so if you don't need them, type make postgresql instead.

The makefile will install all products in /Applications/Postgres.app/Contents/Versions/xx (xx is the major version of PostgreSQL). So for best results, make sure that directory is empty before starting the build.

If you want to change the version number of any of the dependencies, edit the makefile (all version numbers are specified at the top).

You can use the -j option (eg. make -j 3 postgresql) for parallel builds. My recommendation is to use one more job than the number of logical processors you have. Since my macOS 10.12 VM is limited to 2 virtual CPUs, I use -j 3. However, parallel builds make debugging problems a lot harder, so don't use them when something doesn't work.

Always check the exit code of make to see if any errors occurred, eg. make -j 3 || echo "Build failed with exit code $?"

Prerequisites for building the binaries

At the very least, you need the following:

  • Xcode
  • Developer Tools (install with xcode-select --install)
  • Python from python.org in version 3.8.x (PostgreSQL 13), 3.9.x (PostgreSQL 14), 3.11.x (PostgreSQL 15) or 3.12.x (PostgreSQL 16)

For building PostGIS, you also need

  • autoconf
  • automake
  • pkgconfig (when building GDAL 3.0.0 or later)
  • libtool
  • cmake (when building universal binaries - PostgreSQL 14 or later)

By default, PostgreSQL is built with documentation. To build the PostgreSQL 13 docs, you need these packages (see https://www.postgresql.org/docs/current/docguide-toolsets.html for details):

  • docbook-xml-4.5
  • docbook-xsl-nons
  • fop

The quickest way to install all the dependencies is with MacPorts. Install MacPorts, then type:

sudo port -N install autoconf automake pkgconfig libtool docbook-xml-4.5 docbook-xsl-nons fop

(The -N flag tells Macports to install required dependencies without asking)

Older versions required a different set of packages for building the docs, please see the specific versions of the documentation page https://www.postgresql.org/docs/current/docguide-toolsets.html for details.

It is also possible to install those using homebrew, at least for PostgreSQL 14 and later:

brew install automake cmake docbook-xsl libtool pkg-config    

Under the Hood

Postgres.app bundles the PostgreSQL binaries inside the application package. When you first start Postgres.app, here's what it does:

  • Initialise a database cluster: initdb -D DATA_DIRECTORY -U postgres --encoding=UTF-8 --locale=en_US.UTF-8. Starting with PostgreSQL 15 additionally: --locale-provider=icu --icu-locale=en-US --data-checksums
  • Start the server: pg_ctl start -D DATA_DIRECTORY --wait --log=DATA_DIRECTORY/postgres-server.log --options="-p PORT"
  • Create a superuser: createuser -U postgres -p PORT --superuser USERNAME
  • Create a user database: createdb USERNAME

On subsequent app launches, Postgres.app only starts the server.

The default DATA_DIRECTORY is /Users/USERNAME/Library/Application Support/Postgres/var-xx

Note that Postgres.app runs the server as your user, unlike other installations which might create a separate system user named postgres.

When you stop a server the following command is performed. The same happens for all running servers if quit Postgres.app using the menubar icon:

  • pg_ctl stop --mode=fast --wait -D DATA_DIRECTORY

Command Line Utilities

Postgres.app also includes useful command line utilities (note: this list may be outdated):

  • PostgreSQL: clusterdb createdb createlang createuser dropdb droplang dropuser ecpg initdb oid2name pg_archivecleanup pg_basebackup pg_config pg_controldata pg_ctl pg_dump pg_dumpall pg_receivexlog pg_resetxlog pg_restore pg_standby pg_test_fsync pg_test_timing pg_upgrade pgbench postgres postmaster psql reindexdb vacuumdb vacuumlo
  • PROJ.4: cs2cs geod invgeod invproj nad2bin proj
  • GDAL: gdal_contour gdal_grid gdal_rasterize gdal_translate gdaladdo gdalbuildvrt gdaldem gdalenhance gdalinfo gdallocationinfo gdalmanage gdalserver gdalsrsinfo gdaltindex gdaltransform gdalwarp nearblack ogr2ogr ogrinfo ogrtindex testepsg
  • PostGIS: pgsql2shp raster2pgsql shp2pgsql

See the documentation for more info.

Using the pl/pgsql Debugger

First, you'll need to adjust the configuration file (postgresql.conf) to preload the debugger extension. Add the following line:

shared_preload_libraries = 'plugin_debugger'

After you've saved this file, restart the server. You'll need to load the debugger extension into the database you wish to debug using:

CREATE EXTENSION pldbgapi;

Debugging requires that you are a superuser. Please refer to the documentation for further information. This requires that you use a supported client, such as PgAdmin 4. The official documentation for the module can be accessed here.

Contact

If you find a bug, please open an issue.

Postgres.app is maintained by Jakob Egger and Tobias Bussmann.

License

Postgres.app is released under the PostgreSQL License. See LICENSE for additional information.

postgresapp's People

Contributors

adamhartford avatar chrispysoft avatar datensen avatar dijonkitchen avatar ivailon avatar jace avatar jakob avatar jasiek avatar kashif avatar lauris avatar marschall avatar martinjankoehler avatar mattrobenolt avatar mattt avatar mbaltaks avatar nhojpatrick avatar nicksturgeon avatar nruth avatar parkr avatar pascalwengerter avatar piperchester avatar rathboma avatar singingwolfboy avatar skinp avatar tbussmann avatar tildeslash avatar ttfkam avatar ultimate-deej avatar voikya avatar wttw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

postgresapp's Issues

Contrib module in PostgresApp?

I installed PostgreSQL from PostgresApp, but when I am trying to open PgAdmin, its complaining about the missing postgresql-contrib modules. Are they included in PostgresApp, or do they need to be installed some other way. I have tried everything so far, but couldn't get the contrib module installed. And homebrew was of no help whatsoever.

Documentation tweaks

It's great that the app prompts you to "Open Documentation" when you run it, but it would be very helpful to link to the docs from the main site and in the README here on Github.

Also, as far as I can tell the app defaults to no password and a base user of $USER. Based on an HN thread about PosgresApp, I think it would be a good idea to mention that in the documentation.

One other small thing: On the documentation page, it says that data lives at ~/Library/Containers/com.heroku.Postgres/Data/Library/Application\ Support/Postgres/var. But for the current version - 1.0 (11) - data seems to be at ~/Library/Application\ Support/Postgres/var.

Thanks for PostgresApp.

Unable to make configuration changes effective

I'm not sure how is Postgres.app loading the default configuration, but I need to change the default settings to allow listening on all interfaces.

I have changed postgresql.conf and pg_hba.conf under:

~/Library/Containers/com.heroku.Postgres/Data/Library/Application\ Support/Postgres/var/

but there's nothing I can do to make it work. As a test, I changed the listening port to be 5431 and it still doesn't work.

Is there something I can do so I can make postgres listen on all interfaces? I need to connect to it from a VMWare machine.

install doesn't create PostgreSQL user with current username

When I install the app I don't get a PostgreSQL user with my user name. The app status when first launched is Could not launch on Port 5432.

When I run psql it gives:
psql: FATAL: role "adam" does not exist

but with psql -U postgres I get the normal psql prompt.

I've tried to uninstall-reinstall a few times, without a different result. I removed all existing postgres installations before I added the app.

What is going on and how do I fix it?

Missing libjpeg for PostGIS

Doing create extension postgis fails on machines that don't have libjpeg on them. This should be bundled like all of the other static libs.

(via Adam Horner)

Library not loaded: /usr/local/lib/liblwgeom-2.0.0.dylib

I had a previous installation of PostGres w/ PostGIS. I believe I removed everything I needed but this seems to be coming up whenever I try to use the shp2psql tool.

e.g.

% shp2pgsql v_centreline_od_bikeways_wgs84.shp > bikeways.sql
dyld: Library not loaded: /usr/local/lib/liblwgeom-2.0.0.dylib
   Referenced from: /Applications/Postgres.app/Contents/MacOS/bin//shp2pgsql
   Reason: image not found
[1]    47230 trace trap  shp2pgsql v_centreline_od_bikeways_wgs84.shp > bikeways.sql

When I google around, this seems to be a potential conflict with PostGIS versions and this library. Any recommendations as to what I can do? Is this an issue with Postgres.app even, or just my own fault? :)

can't connect - invalid connection option "client_encoding"

It's in my path...

which psql
/Applications/Postgres.app/Contents/MacOS/bin/psql

It's running ....

ps ax | grep post
335 ?? Ss 0:16.75 /System/Library/PrivateFrameworks/DiskImages.framework/Resources/diskimages-helper -uuid C09535A5-8138-4FAD-902E-76165B656061 -post-exec 4
58472 ?? Ss 0:02.88 /System/Library/PrivateFrameworks/DiskImages.framework/Resources/diskimages-helper -uuid D0400720-AA1B-466A-B7C7-5ED3DFB7343C -post-exec 4
98281 ?? S 0:00.35 /Applications/Postgres.app/Contents/MacOS/bin/postgres -D /Users/edwardam/Library/Containers/com.heroku.Postgres/Data/Library/Application Support/Postgres/var -p5432
98283 ?? Ss 0:00.06 postgres: writer process
98284 ?? Ss 0:00.04 postgres: wal writer process
98285 ?? Ss 0:00.01 postgres: autovacuum launcher process
98286 ?? Ss 0:00.01 postgres: stats collector process

But I get this error ...

psql -h localhost
psql: invalid connection option "client_encoding"

PLVEIGHT

will=# create extension plv8;
ERROR:  could not load library "/Users/will/Downloads/Postgres.app/Contents/MacOS/lib/plv8.so": dlopen(/Users/will/Downloads/Postgres.app/Contents/MacOS/lib/plv8.so, 10): Library not loaded: /Applications/Postgres.app/Contents/MacOS/lib/libv8.dylib
  Referenced from: /Users/will/Downloads/Postgres.app/Contents/MacOS/lib/plv8.so
  Reason: image not found
will-# \q
~ ➤ uname -a                                                                   
Darwin nott.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64

can't install postgis as an extension

get the following error:

2012-05-21 18:52:32 ERROR : ERROR: could not load library "/Applications/Postgres.app/Contents/MacOS/lib/rtpostgis-2.0.so": dlopen(/Applications/Postgres.app/Contents/MacOS/lib/rtpostgis-2.0.so, 10): Library not loaded: /usr/local/lib/libjasper.1.0.0.dylib
Referenced from: /Applications/Postgres.app/Contents/MacOS/lib/libgdal.1.dylib
Reason: image not found

Building Issue on Lion / XCode 4.3.3

When I tried to build PostgresApp it failed because it couldn't find ossp-uid.

After installing it via homebrew it worked but I guess it should be either put into the documentation or ossp-uid should be installed as a dependency.

OS: 10.7.4
XCode: 4.3.3

"Can't find the PostgreSQL client libray (libpq)" after enterprise uninstall...

So, I was trying a fresh reinstall of Postgres tonight on my Mac Lion 10.7. I had previously installed the enterpriseDB package, so I uninstalled that first with the default uninstallation manager, then installed the PostgresApp. I edited my PATH so that 'which psql' shows the correct Postgres (/Applications/Postgres.app/Contents/MacOS/bin/psql). I then simply tried to start my rails server but was given some error associated with pg. So I figured I'd just uninstall and reinstall the gem, thinking that something just got out of whack. Well, now every time I try to install pg, I get the eventual error "Can't find the PostgreSQL client library (libpq)". I did a bit of research and tried various things like setting ARCHFLAGS when attempting the install...all with no luck. Any ideas here? This seemed to be a somewhat common issue in the past with installs through MacPorts and Homebrew, but I've yet to find anyone who encountered this issue with the PostgresApp. Below is the detailed output of my bundle install. Thanks!

checking for pg_config... yes
Using config values from /Applications/Postgres.app/Contents/MacOS/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)

Postgis

I've ran into a problem when restoring a db...

pg_restore: [archiver (db)] Error from TOC entry 207; 3079 91452 EXTENSION postgis 
pg_restore: [archiver (db)] could not execute query: ERROR:  could not load library     "/Applications/Postgres.app/Contents/MacOS/lib/postgis-2.0.so": dlopen(/Applications/Postgres.app/Contents/MacOS/lib/postgis-    2.0.so, 10): Library not loaded: /Users/mattt/Code/heroku/Postgres/Postgres/Vendor/postgres/lib/libgeos_c.1.dylib
  Referenced from: /Applications/Postgres.app/Contents/MacOS/lib/postgis-2.0.so
  Reason: image not found
    Command was: CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;
pg_restore: creating COMMENT EXTENSION postgis
pg_restore: [archiver (db)] Error from TOC entry 4448; 0 0 COMMENT EXTENSION postgis 
pg_restore: [archiver (db)] could not execute query: ERROR:  extension "postgis" does not exist
    Command was: COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions';
pg_restore: creating EXTENSION postgis_topology
pg_restore: [archiver (db)] Error from TOC entry 209; 3079 93690 EXTENSION postgis_topology 
pg_restore: [archiver (db)] could not execute query: ERROR:  required extension "postgis" is not installed

So I tried installing Postgis as an extension and got this...

=# CREATE EXTENSION postgis;
ERROR:  could not load library "/Applications/Postgres.app/Contents/MacOS/lib/postgis-2.0.so":   dlopen(/Applications/Postgres.app/Contents/MacOS/lib/postgis-2.0.so, 10): Library not loaded:     /Users/mattt/Code/heroku/Postgres/Postgres/Vendor/postgres/lib/libgeos_c.1.dylib
  Referenced from: /Applications/Postgres.app/Contents/MacOS/lib/postgis-2.0.so
  Reason: image not found

I don't know enough about installing postgis, but it's weird that it has a local path in there with your username, figured this might be a problem with the app?

Postgres.app + OS X 10.8 Gatekeeper

I was unable to run Postgres.app on Mountain Lion with its default Gatekeeper settings (Mac App Store and identified developers)

It kind of sucks, I know. There are really only two solutions here:
1. Have the hosted version of Postgres.app signed and verified by Apple, or 2. Include a disclaimer in the Readme about Gatekeeper.

problems with shp2pgsql

When I try loading data using the 'shp2pgsql' function I get the following error message:

$ shp2pgsql
dyld: Library not loaded: /usr/local/lib/liblwgeom-2.0.1.dylib
  Referenced from: /Applications/Postgres.app/Contents/MacOS/bin/shp2pgsql
  Reason: image not found
Trace/BPT trap: 5

Works with psql, and Induction, but not Rails 3.2.1

I had homebrew postgresql installed and have removed it.

% which psql /Applications/Postgres.app/Contents/MacOS/bin/psql

I can connect to my database fine with psql. I am getting the following error when attempting to do anything with my Rails app, e.g. running rake to run tests, or attempting to run the server.

could not connect to server: Permission denied Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

I was able to download my latest heroku pgbackups and import it into Postgres.app. I can connect to the database and query it with Induction. The only thing not working is Rails (version 3.2.1, and Ruby 1.9.3). :(

postgis extension depends on /usr/local/lib/libjpeg.8.dylib

Just did a fresh install of mac os x mountain lion, using postgresapp for the first time and when I tried to run

create extension postgis;

ERROR: could not load library "/Applications/Postgres.app/Contents/MacOS/lib/rtpostgis-2.0.so": dlopen(/Applications/Postgres.app/Contents/MacOS/lib/rtpostgis-2.0.so, 10): Library not loaded: /usr/local/lib/libjpeg.8.dylib
Referenced from: /Applications/Postgres.app/Contents/MacOS/lib/libgdal.dylib
Reason: image not found

a simple brew install libjpeg fixed the problem, but I don't believe that is the intention of this app setup.

Postgres App / Homebrew

When you have a homebrew postgres instance running, postgres.app doesn't make any noise about another postgres running on the system and displays that postgres is running on 5432. This is true, it's just not the one under the control of postgres.app.

allow more connections

It looks like there are 1 or at least a limited number of connections allowed with this db

starting up a PlayFramework app which uses a connection pool fails with

[error] FATAL: sorry, too many clients already

libjasper and libjpeg dynlib links broken

There is non relative dynlib links for libjpeg and lib jasper in imginfo and gdal* -commads

$ otool -L imginfo
/Users/mattt/Code/heroku/PostgresApp/Postgres/Vendor/postgres/lib/libjasper.1.dylib
/usr/local/lib/libjpeg.8.dylib
...

$ otool -L gdalinfo
@executable_path/../lib/libgdal.1.dylib
/usr/local/lib/libjasper.1.0.0.dylib (compatibility version 2.0.0, current version 2.0.0)
/usr/local/lib/libjpeg.8.dylib (compatibility version 12.0.0, current version 12.0.0)
...

Reason might be because difference in filename and install name:

$ otool -D libjasper.1.0.0.dylib
libjasper.1.0.0.dylib:
/Applications/Postgres.app/Contents/MacOS/lib/libjasper.dylib

*otool output edited for readability

Could not load library "/Applications/Postgres.app/Contents/MacOS/lib/postgis-2.0.so

$ rake db:create

PG::Error: ERROR: could not load library "/Applications/Postgres.app/Contents/MacOS/lib/postgis-2.0.so": dlopen(/Applications/Postgres.app/Contents/MacOS/lib/postgis-2.0.so, 10): Library not loaded: /Users/mattt/Code/heroku/PostgresApp/Postgres/Vendor/postgres/lib/libgeos-3.3.5.dylib
Referenced from: /Applications/Postgres.app/Contents/MacOS/bin/../lib/libgeos_c.1.dylib
Reason: image not found

.../Users/mattt/Code...

Error setting TimeZone

I came across this when setting up a Django site with python manage.py syncdb. It's trying to run the set time zone command here.

In psql I've run the following:

  • set time zone "Europe/London"; Fails
  • set time zone utc; Fails
  • set time zone 0; Works

I tried the same commands in a fresh install of 9.0 on a linux machine where they worked.

Before I installed Postgres.app I had a brewed version which I removed, not sure if that could affect anything!

Intro GUI

I may just be an idiot, but when I opened the app for the first time, I didn't notice that it added an icon to the toolbar. I thought something just wasn't working, so I killed all the processes and tried again and finally noticed it a few minutes later.

I think it would be nice to add a little intro window the first time you open it, just so the user knows what's going on.

menu item to drop and recreate a fresh db

Would be great for testing migrations/evolutions and just starting easily with a fresh db to have a menu item that when activated destroys the whole db and restarts postgres with an empty db

psql: could not connect to server: Connection refused

Hello,

I'm trying to run Postgress.app on Moutain Lion (don't know if it matters) but I'm getting this error:

[~] ➔ psql -h localhost
psql: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (fe80::1) and accepting
TCP/IP connections on port 5432?

The elephant icon on the menu bar says it is running on port 5432. I've looked into ~/Library/Containers and the directory com.heroku.Postgres isn't there.

Looking in the Console.app I found this just after I open Postgress.app:

24/07/12 12:27:45,398 Postgres[26507]: Could not connect the action selectPostgresStatus: to target of class AppDelegate
24/07/12 12:27:45,551 Postgres[26507]: 26509 /Applications/Postgres.app/Contents/MacOS/bin/pg_ctl: Status 0

Any ideas how to solve? Any places where I can get more information about the problem, logs?

The 'uuid-ossp' extension isn't available to install :'(

db=# CREATE EXTENSION "uuid-ossp"
ERROR:  could not open extension control file "/Applications/Postgres.app/Contents/MacOS/share/extension/uuid-ossp.control": No such file or directory

Can this get added to the included extensions?

Menu option to drop you into psql

The documentation is good, but setting the path to psql or running the system psql with special command line arguments is not user friendly, at least not for the new user who has just installed the software.

In fact, I'm not sure that a psql binary is shipped with Mountain Lion.

It would be nice if there was a menu option to just launch terminal with the Postgres.app shipped version of psql. That'd give users a point-and-click way of getting up and running. Yes, you'd hope the user would setup their path (and maybe automating that is another feature) but this would make it easy in the first instance.

libjasper and libjpeg dynlib links broken

There is non relative dynlib links for libjpeg and lib jasper in imginfo and gdal* -commads

$ otool -L imginfo
/Users/mattt/Code/heroku/PostgresApp/Postgres/Vendor/postgres/lib/libjasper.1.dylib
/usr/local/lib/libjpeg.8.dylib
...

$ otool -L gdalinfo
@executable_path/../lib/libgdal.1.dylib
/usr/local/lib/libjasper.1.0.0.dylib (compatibility version 2.0.0, current version 2.0.0)
/usr/local/lib/libjpeg.8.dylib (compatibility version 12.0.0, current version 12.0.0)
...

Reason might be because difference in filename and install name:

$ otool -D libjasper.1.0.0.dylib
libjasper.1.0.0.dylib:
/Applications/Postgres.app/Contents/MacOS/lib/libjasper.dylib

*otool output edited for readability

Switching from Homebrew to Postgres.app, and can't connect

I just recently switched from my Homebrew installation (which was a bit of a pain to manage) to PostgresApp. For some reason, it seems to be trying to connect to homebrew's binary.

$ psql
psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

and if I try and specify the host:

$ psql -h localhost
psql: could not connect to server: Connection refused
    Is the server running on host "localhost" (::1) and accepting
    TCP/IP connections on port 5432?
could not connect to server: Connection refused
    Is the server running on host "localhost" (127.0.0.1) and accepting
    TCP/IP connections on port 5432?
could not connect to server: Connection refused
    Is the server running on host "localhost" (fe80::1) and accepting
    TCP/IP connections on port 5432?

And yes, it is attempting to use the right binary.

$ which psql
/Applications/Postgres.app/Contents/MacOS/bin/psql

I really need this to work, so any help would be greatly appreciated!

dyld: Library not loaded error when using psql from command line

dyld: Library not loaded: /Users/mattt/Code/heroku/Postgres/Postgres/Vendor/postgres/lib/libpq.5.dylib
Referenced from: /Applications/Postgres.app/Contents/MacOS/bin/psql
Reason: image not found
Trace/BPT trap: 5

I used the installer download from the website. I had previously had Postgres installed from their main site install, I uninstalled that from a shell script provided by them.

Add Sparkle

It would be awesome if it checked for updates automatically with Sparkle.

Errors when installing to ~/Applications/

Some users, including myself, install applications to ~/Applications/. For some it is out of necessity, for others like me it is just an organizational thing. (All apps I install by hand, as opposed to an installer or the App Store, go there.) However, Postgres.app does not work when installed there. The app will start, and will say that it is running on port 5432. But creating a database fails.

$ which createdb
/Users/benspaulding/Applications/Postgres.app/Contents/MacOS/bin/createdb
$ createdb test
createdb: could not connect to database postgres: could not connect to server: Permission denied
    Is the server running locally and accepting
    connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

Moving Postgres.app to /Applications/ fixed the issue. The app should be able to work in the system or user Applications directory, and any subdirectory under those. (IMO)

Quitting/Status UI

I downloaded the app, dragged it to my desktop, realized I had an old version, and tried to delete it. It wouldn't let me delete it since it was running. The only way I could find to quit it was via Activity Monitor. It would be awesome if there was some UI to see if Postgres is running, start/stop, and quit.

Setting max_connections higher 27 prevents postgres from starting

I am trying to increase the number of connections (in order to use with Navicat Essentials client, which seems to open many connections) tweaking the contents of file /Users/XXXX/Library/Application Support/Postgres/var/postgresql.conf.

The default content of the configuration line is :

max_connections = 20 # (change requires restart)

I can set the value to 21, 22 etc until 27 , and restart PostGres.app. Launching psql works without problem ... but as soon as I reach 28, the postgres.app icon still shows up in the top bar, but trying to connect with psql fails :

psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Is there some kind of restrictions in Postgres.app about this?

Thanks for an amazing tool !

Postgres Start On Boot

I know you can set PostgresApp to start on login, but how do you set it up to start at boot, without requiring a user to log in?

All databases missing after upgrade from 1.0 to 1.1

I just downloaded Postgres.App v1.1, dropped it over v1.0, and found that all my databases are gone. Following a tip from the docs, I made this unfruitful attempt to restore the data, thinking maybe the path had simply been changed:

cd ~/Library/Containers/com.heroku.Postgres/Data/Library/Application\ Support/Postgres/
mv var fresh_var
cp -R ~/Library/Application\ Support/Postgres/var .

Is my data gone forever? Please advise.

Postgresql doesn't stop on quit

It seams that the command for stopping the server is wrong:
6/4/12 8:17:11.663 AM com.heroku.postgres-service: pg_ctl: unrecognized signal name "SIGTERM"

pg_ctl --help shows that the accepted signals are: HUP INT QUIT ABRT TERM USR1 USR2

Thanks for a great product :)

Add hi-res menu bar icon

Any chance of a retina-optimised elephant for those of us with more money than sense? The little fella looks all fuzzy and that makes me sad. :'-(

Application Icon

I like the version 005 icon way more than the version 006 one. Just saying :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.