Обсуждение: pg_ctl problem
When running the pg_ctl command i am facing this error pg_ctl: no database directory specified and environment variable PGDATA un= set I use other options also but no solution was found. could someone help me on this Regards Madhu Harchandani The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and ma= y contain proprietary, confidential or privileged information. If you are n= ot the intended recipient, you should not disseminate, distribute or copy t= his e-mail. Please notify the sender immediately and destroy all copies of = this message and any attachments.=20 WARNING: Computer viruses can be transmitted via email. The recipient shoul= d check this email and any attachments for the presence of viruses. The com= pany accepts no liability for any damage caused by any virus transmitted by= this email. www.wipro.com
On Tue, Mar 4, 2008 at 4:11 PM, <madhu.harchandani@wipro.com> wrote:
>
> When running the pg_ctl command i am facing this error
> pg_ctl: no database directory specified and environment variable PGDATA
> unset
> I use other options also but no solution was found.
> could someone help me on this
>
Thats not enough information to resolve anything. Please be a bit more
descriptive.
Anyway, its pretty clear that you do not have PGDATA set in the environment.
So you need to run the command as follows:
pg_ctl -D /your/postgres/data/directory start
RTFM will definitely help.
--=20
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com
EnterpriseDB http://www.enterprisedb.com
17=B0 29' 34.37"N, 78=B0 30' 59.76"E - Hyderabad
18=B0 32' 57.25"N, 73=B0 56' 25.42"E - Pune *
37=B0 47' 19.72"N, 122=B0 24' 1.69" W - San Francisco
http://gurjeet.frihost.net
Mail sent from my BlackLaptop device
On Tue, Mar 4, 2008 at 4:51 PM, <madhu.harchandani@wipro.com> wrote:
>
>
> thanks for replying
>
> when i run this command i found the error as
>
> pg_ctl reload -l logfile -D /var/lib/pgsql/data
> could not change directory to "/root"
> pg_ctl: PID file "/var/lib/pgsql/data/postmaster.pid" does not exist
> Is server running?
>
> plz could u help me for this thank in advance
>
Please DO NOT exclude the list from the conversation. Adding GENERAL again.
I am not able to understand the following line in your error log:
<>
could not change directory to "/root"
</>
maybe someone else can help here.
Are you sure you have a running postgres instance on this box? The 'reload'
command can be executed only for a running Postgres instance.
If postgres is running (ps or top commands can help determine that), then
figure out which directory is that instance using as it's DATA directory. If
postgres is not running, then substitute the 'reload' in your command with
'start'.
If you are still unable to solve the problem, then please send us the output
of following commands: (assuming you are on a nixen (linux/Unix))
ps aux | grep postmaster
ps aux | grep postgres
which pg_ctl
Best regards
--=20
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com
EnterpriseDB http://www.enterprisedb.com
17=B0 29' 34.37"N, 78=B0 30' 59.76"E - Hyderabad
18=B0 32' 57.25"N, 73=B0 56' 25.42"E - Pune *
37=B0 47' 19.72"N, 122=B0 24' 1.69" W - San Francisco
http://gurjeet.frihost.net
Mail sent from my BlackLaptop device
Madhu... Please.... please... please.... use the 'REPLY TO ALL' option in
your mail client.
Forwarding again to the bugs list, in the hopes of pooling in others.
---------- Forwarded message ----------
From: <madhu.harchandani@wipro.com>
Date: Tue, Mar 4, 2008 at 7:02 PM
Subject: RE: [BUGS] pg_ctl problem
To: singh.gurjeet@gmail.com
Hi again
pg_ctl start is running
pg_ctl start -l logfile -D /var/lib/pgsql/data
could not change directory to "/root"
server starting
*********************************************************************
Sir there is no any problem if we start rather than reload it.
******************************************************************
but if i write
pg_ctl reload -l logfile -D /var/lib/pgsql/data
could not change directory to "/root"
pg_ctl: PID file "/var/lib/pgsql/data/postmaster.pid" does not exist
Is server running?
Here i am writing in /var/lib/pgsql/data
the output of the command which u told me is
[root@mkd2ts2s-167471 ~]# ps aux | grep postmaster
postgres 6219 0.0 0.3 35872 3048 ? S 15:16 0:00
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
root 7270 0.0 0.0 4044 680 pts/1 S+ 17:56 0:00 grep
postmaster
[root@mkd2ts2s-167471 ~]# ps aux | grep postgres
postgres 6219 0.0 0.3 35872 3048 ? S 15:16 0:00
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
postgres 6221 0.0 0.1 35872 976 ? Ss 15:16 0:00 postgres:
writer process
postgres 6222 0.0 0.0 7320 656 ? Ss 15:16 0:00 postgres:
stats collector process
root 6223 0.0 0.1 4700 1204 pts/2 S 15:16 0:00 su postgres
postgres 6224 0.0 0.1 4704 1376 pts/2 S+ 15:16 0:00 bash
root 7300 0.0 0.0 4044 684 pts/1 S+ 17:56 0:00 grep
postgres
************************************************888
One more problem sir
bash-3.2$ psql -d xnat -f sql/xnat.sql -U xnat
could not change directory to "/root"
psql: FATAL: Ident authentication failed for user "xnat"
I will be very obliged if u would solve my problem actually i have to start
my project
thanks
Regards
Madhu Harchandani
The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain proprietary, confidential or privileged information. If you are not
the intended recipient, you should not disseminate, distribute or copy this
e-mail. Please notify the sender immediately and destroy all copies of this
message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should
check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email.
www.wipro.com
--=20
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com
EnterpriseDB http://www.enterprisedb.com
17=B0 29' 34.37"N, 78=B0 30' 59.76"E - Hyderabad
18=B0 32' 57.25"N, 73=B0 56' 25.42"E - Pune *
37=B0 47' 19.72"N, 122=B0 24' 1.69" W - San Francisco
http://gurjeet.frihost.net
Mail sent from my BlackLaptop device