EnterpriseDB: The Enterprise Postgres Company Postgres Plus Forums: The PostgreSQL Open Source Database from EnterpriseDB
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 

Mac OS X Lion (10.7) -- What's the current status with the installer?  XML

Forum Index » PostgreSQL Installers for Windows, Linux and OS X
Author Message
Basil_Bourque

New member

Joined: 29 Jan 2012 03:50:40
Messages: 1
Offline

What's the current status?
What issues should I know about?

----| Other discussions |----------

I've not seen any recent threads about using the One-Click installer for Postgres 9.1.2 on Mac OS X 10.7.2 (Lion).

I found this one recent thread:
http://forums.enterprisedb.com/posts/list/3030.page#11342
But it discussed memory allotments, but not Lion-specific issues.

There are older threads in these forums from last year, but they seem to deal with prior versions of Postgres or Lion. Likewise for the Google hits I've seen so far.

----| Version |----------

I see Apple is bundling Postgres 9.0.4 with Lion 10.7.2.

I'm talking about the regular client/desktop-edition of Lion, not the Server edition.

And I am focused on a "clean install" of Lion, not upgrading Snow Leopard where Postgres was already installed.

----| Users |----------

Apple seems to have created a Unix user and group both named "_postgres". In contrast, the One-Click Installer creates a user named "postgres" (without underscore).

One difference I noticed after using One-Click Installer is that when starting the Mac, the "postgres" user is now offered as another Mac user. But of course it is not a full-fledged Mac (GUI) user; trying to login at startup fails. So this user's appearance at startup is a non-issue, I assume.

----| Processes |----------

There seem to be no Postgres-related processes running by default, as seen in the "Activity Monitor" app while specifying "All Processes".

Does anybody know if the Apple-supplied Postgres is ever launched later, after startup? If so, at the very least a port-listening collision would occur. Why did Apple choose to bundle Postgres in the client/desktop edition? Is it used by any utilities?

----| Unknowns |----------

I tried the current installer on a throw-away installation of Lion. All seemed well. The pgAdmin app works, and I used it to create a new database.

I would like to install Postgres 9.1.2 on my real development Mac. So I am asking what issues or problems with Lion I should expect.

If there are any release notes for either the Installer or Postgres that discuss Lion issues, please refer me. I've not found any.

--Basil Bourque

This message was edited 1 time. Last update was at 29 Jan 2012 04:17:35

Dave_P

Senior member
[Avatar]

Joined: 26 Sep 2005 12:09:59
Messages: 158
Offline

Basil_Bourque wrote:What's the current status?

I see Apple is bundling Postgres 9.0.4 with Lion 10.7.2.

I'm talking about the regular client/desktop-edition of Lion, not the Server edition.

And I am focused on a "clean install" of Lion, not upgrading Snow Leopard where Postgres was already installed.


Hi,

The current versions of the one-click installer for 9.0.6 and 9.1.2 are fully supported on Lion. They should work fine for you. The Apple supplied version only runs as a server on the Server edition of Lion. On the desktop version, they just supply the client tools (psql etc.) and libpq.
consultus

New member

Joined: 21 Mar 2012 08:46:59
Messages: 6
Offline

I ran the one click installer on my 10.7.3 Mac but I get errors when I try to use it.

Jeffs-MacBook-Pro-2:local Jeff$ psql
psql: 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"?

is 10.7.3 supported?
is there an uninstall I can run?

Thanks

This message was edited 1 time. Last update was at 21 Mar 2012 08:54:26

Dave_P

Senior member
[Avatar]

Joined: 26 Sep 2005 12:09:59
Messages: 158
Offline

consultus wrote:I ran the one click installer on my 10.7.3 Mac but I get errors when I try to use it.

Jeffs-MacBook-Pro-2:local Jeff$ psql
psql: 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"?

is 10.7.3 supported?
is there an uninstall I can run?

Thanks


Yes, Lion is fully supported. You're using the Apple-supplied psql binary though, which is configured with a different location for the default Unix Domain Socket. Try something like "psql -h /tmp", or make sure you use the psql binary shipped with the installer which will default to the appropriate location. You'll probably also want to add "-U postgres" to connect as the right user (whichever binary you use).
consultus

New member

Joined: 21 Mar 2012 08:46:59
Messages: 6
Offline

Thanks Dave,

I ran the below with no new result;

psql -h /tmp -U postgres
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"?

How do I ensure the correct binary's are used? Below is my config
Some of those folders don't exist. Like include under /usr

Jeffs-MacBook-Pro-2:local Jeff$ pg_config
BINDIR = /usr/bin
DOCDIR = /usr/share/doc/postgresql
HTMLDIR = /Library/WebServer/Documents/postgresql
INCLUDEDIR = /usr/include
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/server
LIBDIR = /usr/lib
PKGLIBDIR = /usr/lib/postgresql
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/man
SHAREDIR = /usr/share/postgresql
SYSCONFDIR = /private/etc/postgresql
PGXS = /usr/lib/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--prefix=/usr' '--sbindir=/usr/libexec' '--sysconfdir=/private/etc' '--localstatedir=/var/pgsql' '--htmldir=/Library/WebServer/Documents/postgresql' '--enable-thread-safety' '--enable-dtrace' '--with-tcl' '--with-perl' '--with-python' '--with-gssapi' '--with-krb5' '--with-pam' '--with-ldap' '--with-bonjour' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-system-tzdata=/usr/share/zoneinfo' 'CFLAGS=-arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations' 'LDFLAGS=-arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations' 'LDFLAGS_EX=-mdynamic-no-pic'
CC = gcc
CPPFLAGS = -I/usr/include/libxml2
CFLAGS = -arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
CFLAGS_SL =
LDFLAGS = -arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations -Wl,-dead_strip_dylibs
LDFLAGS_EX = -mdynamic-no-pic
LDFLAGS_SL =
LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm
VERSION = PostgreSQL 9.0.5
Dave_P

Senior member
[Avatar]

Joined: 26 Sep 2005 12:09:59
Messages: 158
Offline

consultus wrote:Thanks Dave,

I ran the below with no new result;

psql -h /tmp -U postgres
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"?

How do I ensure the correct binary's are used? Below is my config
Some of those folders don't exist. Like include under /usr

Jeffs-MacBook-Pro-2:local Jeff$ pg_config
BINDIR = /usr/bin
DOCDIR = /usr/share/doc/postgresql
...


Those are almost certainly the settings that Apple used (they ship the psql client with Lion). Can you confirm that you installed the EnterpriseDB package, and into what directory?
consultus

New member

Joined: 21 Mar 2012 08:46:59
Messages: 6
Offline


I ran the dmg file linked here http://www.postgresql.org/download/macosx/

Download for Mac OS X 10.4+

The installer did not ask or tell me where it installed the binary files. It just ran.

Searching the web, I see references that only Lion Server ships with pqsl
Dave_P

Senior member
[Avatar]

Joined: 26 Sep 2005 12:09:59
Messages: 158
Offline

consultus wrote:
I ran the dmg file linked here http://www.postgresql.org/download/macosx/

Download for Mac OS X 10.4+

The installer did not ask or tell me where it installed the binary files. It just ran.


The installer linked from there will ask for the installation directory on first installation, but if it detects an existing installation (from our installers) it will just upgrade it without asking for the location. Could it be that your previous installation was configured in a non-standard way that's causing confusion now?

FYI, the default installation directory is under /Library/PostgreSQL, so it would be worth checking there.

Please post the contents of /etc/postgres-reg.ini to help with any further debugging.

consultus wrote:
Searching the web, I see references that only Lion Server ships with pqsl


Lion server ships with the entire PostgreSQL database server. Lion desktop includes the client utilities - psql, pg_dump etc. - and libpq.
consultus

New member

Joined: 21 Mar 2012 08:46:59
Messages: 6
Offline

Hi Dave, I reran the install and things are working better. must have been operator error. thanks
consultus

New member

Joined: 21 Mar 2012 08:46:59
Messages: 6
Offline

Hi Dave, One last question. I made the mistake of setting Locale=en_AU.ISO8859-1 rather than UTF8. Drupal does not seem to like it. Can I simply change Locale=en_AU.ISO8859-1 to Locale=UTF8 in the postgres-reg.ini ? My OS is 10.7.3

Thanks.
Dave_P

Senior member
[Avatar]

Joined: 26 Sep 2005 12:09:59
Messages: 158
Offline

consultus wrote:Hi Dave, One last question. I made the mistake of setting Locale=en_AU.ISO8859-1 rather than UTF8. Drupal does not seem to like it. Can I simply change Locale=en_AU.ISO8859-1 to Locale=UTF8 in the postgres-reg.ini ? My OS is 10.7.3

Thanks.


No, the postgres-reg.ini file just records the installation options to make things easier for other installers that need to discover how the server was installed.

Once the installation is run, you cannot change the cluster-wide encoding (unless you delete the data directory and re-run initdb). You can create databases in different encodings though, if you use template0 as the template, eg:

CREATE DATABASE drupal ENCODING 'UTF8' TEMPLATE template0;
consultus

New member

Joined: 21 Mar 2012 08:46:59
Messages: 6
Offline

Thanks, I tried this but I get the below error;

SQL error:

ERROR: encoding UTF8 does not match locale en_AU.ISO8859-1
DETAIL: The chosen LC_CTYPE setting requires encoding LATIN1.
In statement:
CREATE DATABASE drupal ENCODING 'UTF8' TEMPLATE template0;

where is it getting the locale setting? the OS?
Dave_P

Senior member
[Avatar]

Joined: 26 Sep 2005 12:09:59
Messages: 158
Offline

consultus wrote:Thanks, I tried this but I get the below error;

SQL error:

ERROR: encoding UTF8 does not match locale en_AU.ISO8859-1
DETAIL: The chosen LC_CTYPE setting requires encoding LATIN1.
In statement:
CREATE DATABASE drupal ENCODING 'UTF8' TEMPLATE template0;

where is it getting the locale setting? the OS?


Oh, urgh. I guess that workaround is no good any more. If you haven't done anything else with your installation yet (and don't have any other of our packages installed), it's probably easiest to just uninstall/reinstall. First, run the uninstaller:

sudo open /Library/PostgreSQL/9.1/uninstall-postgresql.app

Then, get rid of the data directory and to be on the safe side, registry file (those get retained after an uninstall in case you're just reinstalling the software and don't want to delete your data):

sudo rm /etc/postgres-reg.ini
sudo rm -rf /Library/PostgreSQL/9.1

Finally, reinstall and pick the appropriate locale (ie. en_AU.UTF to work with Drupal. Note that most other apps are less sensitive to this issue - Drupal is a bit of a pain in that regard.
sudars

New member

Joined: 28 Mar 2012 17:08:01
Messages: 1
Offline

I'm posting this here because it is related and so recent. I am running 10.6.8 snow leopard and am trying to install using the one click installer PostgreSQL-9.1.3-1-osx file.

Using the installer I get the "Problem running post-install step. Installation may not complete correctly. The database cluster initialization failed." error. I can't figure out how to get around this.

From other forums I thought it was something to do with the user, so I've created a user postgres and given it a password, which I then enter as the same password when requested in the install. Still no luck, however.

Any suggestions? I'd be happy to send in my log file if I knew where it was. Driving me insane...

Thanks!

RESOLVED:
--A mere 45 minutes later, I've figured it out. Before running the install I had to create a user called postgres and give it a password I would later use with the installer. The problem was that I had followed instructions for this on another forum and used the command line, which inadvertently set my userid to zero, which then caused it to fail. I was able to determine this by typing "su postgres", entering the password, and then "whoami" returned root. Dangerous. By changing the userid I was able to run whoami and get back postgres. At that point I reran the installer and it succeeded. Woot.

This message was edited 2 times. Last update was at 28 Mar 2012 18:27:48

 
Forum Index » PostgreSQL Installers for Windows, Linux and OS X
Go to:   
Powered by JForum 2.1.8 © JForum Team