Re: Installation woes via Macports on Mac OS X 10.7

From: Neil Tiffin <neilt(at)neiltiffin(dot)com>
To: René Fournier <renefournier(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Installation woes via Macports on Mac OS X 10.7
Date: 2011-10-08 13:45:04
Message-ID: 7DAFACB8-8307-4A96-BEDC-64CDE745F49E@neiltiffin.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Oct 8, 2011, at 1:01 AM, Tom Lane wrote:

> =?iso-8859-1?Q?Ren=E9_Fournier?= <renefournier(at)gmail(dot)com> writes:
>> I've tried installation 8.4 and 9.0 on two different machines, and at the end can't start Postgresql. Here's the basic story:
>
> No, you started it all right, because it's there in the ps output:
>
>> Fri Oct 07 14:18:20 -- Baby-Irmo :: ps -ax | grep "postgres"
>> 56 ?? 0:08.28 /usr/bin/postgres -D /var/pgsql -c listen_addresses= -c log_connections=on -c log_directory=/Library/Logs -c log_filename=PostgreSQL.log -c log_lock_waits=on -c log_statement=ddl -c log_line_prefix=%t -c logging_collector=on -c unix_socket_directory=/var/pgsql_socket -c unix_socket_group=_postgres -c unix_socket_permissions=0770
>> 226 ?? 0:33.67 postgres: logger process
>> 253 ?? 1:41.76 postgres: writer process
>> 254 ?? 1:12.68 postgres: wal writer process
>> 255 ?? 0:23.39 postgres: autovacuum launcher process
>> 256 ?? 0:38.62 postgres: stats collector process
> The problem is with that command-line option
> "unix_socket_directory=/var/pgsql_socket" that your startup wrapper is
> evidently feeding to the postmaster. That means your postmaster is
> listening on a socket file in /var/pgsql_socket, which is not where your
> psql is expecting to find it:
>
>> Fri Oct 07 14:18:04 -- Baby-Irmo :: /opt/local/lib/postgresql90/bin/psql -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"?
>
> Here, psql shows it's expecting to find the socket file in /tmp, which
> is the default location for PG socket files.
>
> While there are defensible reasons for putting the socket file somewhere
> other than /tmp, I'd have to say that an installation wrapper that
> thinks it should change that setting on the postmaster command line is
> just about as incompetent as it could possibly be. That's equivalent to
> changing the default port number and not bothering to tell the clients
> about it. You need to find a packaging built by somebody with more of a
> clue than that. It's not helping any that you seem to be using a psql
> that was built independently of the postmaster (why is the postmaster in
> /usr/bin when your psql is in /opt/local/lib/postgresql90?) ... but
> frankly, I cannot imagine a sane reason for setting
> unix_socket_directory with that mechanism, unless you're intentionally
> trying to make it hard to connect. (And those unix_socket_group and
> unix_socket_permissions settings are making it even harder ...)
>

You might try http://www.postgresqlformac.com/

Neil

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2011-10-08 14:54:31 Re: PG 9.1 on Debian Squeeze
Previous Message Stephen Frost 2011-10-08 12:03:01 Re: PG 9.1 on Debian Squeeze