Preference Pane for administering PostgreSQL on Mac OS X
Objective-C AppleScript
Latest commit e0ac5e7 Nov 23, 2016 @mckenfra mckenfra committed on GitHub Removed superfluous links in README

README.pod

Postgres Prefs


Overview

A Mac OS X System Preferences pane for controlling the PostgreSQL Database Server.

Features include:

  • Compatible with all PostgreSQL installations - including Homebrew and One click installer
  • Start and stop PostgreSQL Servers at the click of a button - no need for obscure commands
  • Set PostgreSQL to start automatically on computer bootup or user login
  • Easily change PostgreSQL settings in the GUI
  • Control multiple PostgreSQL servers in the same window - NEW IN v2.x

Main Screen

Change Settings

Log

Install Instructions

  1. Download the latest release version here
  2. Once downloaded, unzip it and then either double-click the PostgreSQL.prefPane file, or drag it to System Preferences to install it.
  3. When installing, you will be asked if you want to install it for this user only, or for all users. Choose this user only (either option is fine however).

Uninstall Instructions

  1. Remove from System Preferences
    • Right-click on the PostgreSQL icon in System Preferences, and click Remove
  2. Delete any files named org.postgresql.preferences.*.plist in the following directories:
    • /Library/LaunchDaemons
    • /Library/LaunchAgents
    • ~/Library/LaunchAgents
  3. Delete the following log directories if they exist:
    • /Library/Logs/PostgreSQL
    • ~/Library/Logs/PostgreSQL

FAQ

  • In a nutshell, what does this tool do and what does it not do?
  • It can start and stop PostgreSQL servers, show their running status, and schedule auto-startup at boot/login. It cannot install PostgreSQL, create database clusters, create databases or run SQL.
  • Can I run multiple instances of PostgreSQL on the same machine?
  • Yes - this is new with Version 2! Note that each separate instance of PostgreSQL must have its own data directory and port. It is easy to specify a different port using the settings popup. But to create a separate data directory you must run the initdb command to create a new database cluster, as described in the PostgreSQL documentation.
  • PostgreSQL does not start up.
  • If you clicked Start PostgreSQL, and the server is stuck with status Retrying..., the first step is to click the View Log button. This will open the default log for the server in Mac OS X's Console log-viewing application. From the log messages, it should be clear what the problem is. For example, the PostgreSQL data directory or port may already be in use by another server.
  • I have selected startup at Login/Boot, but PostgreSQL still does not startup automatically.
  • First, make sure you can start the server manually using the Start PostgreSQL button. If this works ok, then please file an issue on github and we will investigate.
  • Does this tool affect my existing installations?
  • The short answer is: no, Postgre Preferences creates its own configuration files for starting/stopping servers, separate from any existing installations. However, from version 2.1 onwards, Postgre Preferences automatically detects and displays already-running servers that were started/configured elsewhere. Any such 'external' servers can be started and stopped like normal servers (if a configuration file is found). If you click the '-' button to delete one of the external servers, you will be prompted whether you also want to delete the server's configuration file, or leave it untouched.
  • Who is Macca Tech, and why did you make this tool?
  • At the moment, Macca Tech consists of just me, a developer who enjoys creating tools and apps on Mac OS X and iOS. I created this tool partly for fun, and partly because I was using PostgreSQL and found it far too complicated to do something as simple as starting and stopping a database server!

Version History

Version Date Comments
v2.4.2 8-Feb 2016 Bug-fix release
  • Fixed error if user's default shell is fish
  • Improved server status icons
v2.4.1 10-Nov 2015 Bug-fix release
  • Fixed unable to start server because username incorrectly marked as invalid
  • Fixed unable to start server after clicking 'Duplicate Server'
  • Fixed server settings not saved after clicking 'Duplicate Server'
v2.4 30-Aug 2015 Bug-fix release
  • Automatically detect all PostgreSQL processes running on system, not just daemons
  • Fixed leaving 'ghost' process running after stopping Postgresapp.com server
  • Fixed background thread for detecting running servers could stop unintentionally
  • Fixed View Log becoming disabled if change startup setting for running server
v2.3 28-Aug 2015 Enhancement release
  • Improved speed/security: replaced external shell script with native code
  • Invalid server settings now highlighted more clearly
  • Changing startup does not affect running server
  • Startup-at-login supported for all users, not just current
  • Fixed briefly showing server as started even though failed to start
v2.2.1 22-Aug 2015 Bug-fix release
  • Automatically detect running Postgresapp.com server
v2.2 9-Aug 2015 Enhancement release
  • See status of all servers without entering password
v2.1 30-Jul 2015 Enhancement release
  • Automatically detect already-running servers configured elsewhere
  • Start/stop these 'external' servers like any others
  • New 'Duplicate Server' function
v2.0 22-Jul 2015 Major release
  • Control multiple servers from a single window
  • Start servers at computer bootup (previously only at login)
  • Easily debug problems using default server logs
  • See running status of servers without entering a password
  • Starting/stopping still password-protected
  • More code is pure Objective-C, less reliance on shell scripts
v1.4.1 22-Jul 2015 Bug-fix release
  • Fixed error message being shown if username setting is non-blank.
v1.4 03-Jul 2015 Bug-fix release
  • Fixed auto-start on login if upgrading from older version of pref pane
  • Clicking auto-start no longer causes Postgre to startup straightaway
v1.3 30-Jun 2015 Bug-fix release
  • Fixed auto-start PostgreSQL on login (OS X 10.10+)
  • Fixed description of auto-start function in interface
  • Detect errors relating to auto-start and show in interface
v1.2 30-Jun 2015 Bug-fix release
  • Fixed auto-start PostgreSQL on login (OS X 10.9)
v1.1 17-Oct 2014 Bug-fix release
  • Fixed errors caused by spaces or ~ in paths
  • Auto-detect Postgres.app install
  • Fixed incompatibility with latest XCode (ARC now mandatory)
  • Note: requires Mac OS X Lion or newer
v1.0.1 10-Mar 2012 Bug-fix release
  • Fixed hard-coded username in start/stop script
  • Fixed bug where settings were getting cleared when user re-authorized
v1.0 29-Dec 2011 Initial release

Contact

Please email any feedback to info@maccatech.com

Links