Skip site navigation (1) Skip section navigation (2)

Re: Connexion to Postgresql using TCP/IP

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Secrétariat <ets(at)rolland-fr(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Connexion to Postgresql using TCP/IP
Date: 2004-07-23 14:33:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
=?iso-8859-1?Q?Secr=E9tariat?= <ets(at)rolland-fr(dot)com> writes:
> I use a PostgreSQL server 7.4 on Linux Mandrake 10 with IP,
> a database gestix is created.
> An PostegreSQL user "postgres" id defined on this server,
> I add in the .bash_profile of this user the line :
> PGDATA=$HOME/data; export PGDATA

> When I log as postgres if I use :
> pg_ctl start
> the postmaster is coming up,
> I can connect from the PC with PgAdmin3 under Windows XP.

> On automatic startup, or when I use :
> service postgresql start
> I can't connect from the PC.

It sounds like the service-start case is picking a different data
directory than you're expecting --- likely /var/lib/postgres, or
whatever the installation default is.

I'm not sure what's in Mandrake 10, but I can tell you that in the Red
Hat RPMs, putting a PGDATA definition into ~/.bash_profile did not work
until very very recently.  The init script did
	su - postgres -s /bin/sh -c "postmaster ..."
thus forcing /bin/sh to be used, and /bin/sh won't pay any attention
to ~/.bash_profile.

This is fixed in recent RPMs (basically by removing "-s /bin/sh"), or
you can dodge the problem by copying the variable definitions into
regular sh's ~/.profile.

			regards, tom lane

In response to


pgsql-general by date

Next:From: SecrétariatDate: 2004-07-23 15:23:32
Subject: Re: Connexion to Postgresql using TCP/IP
Previous:From: SecrétariatDate: 2004-07-23 13:57:31
Subject: Connexion to Postgresql using TCP/IP

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group