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

Re: How do I determine my data dir for a created database for pg_ctl?

From: "Matthew Pettis" <matthew(dot)pettis(at)gmail(dot)com>
To: "Barbara Figueirido" <barbara(at)bariloche(dot)com(dot)ar>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: How do I determine my data dir for a created database for pg_ctl?
Date: 2008-08-20 19:47:44
Message-ID: 82ba77b80808201247j30c5e36fr4cdc0e2094afbf97@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-novice
Thank You, Barbara,

See Klint Gore's solution -- that's the one I used and it worked for
me quite well.

Thanks again,
Matt

On Wed, Aug 20, 2008 at 2:38 PM, Barbara Figueirido
<barbara(at)bariloche(dot)com(dot)ar> wrote:
> Matthew Pettis wrote:
>> Hi,
>>
>> I have a database I can psql into... How can I determine what its
>> absolute path is so I can use pg_ctl on it to restart it?  Because
>> when I use pg_ctl, it tells me I have to provide it in the -D flag as
>> an argument.
>>
>> Thanks,
>> matt
>>
>
> Hi. I'm quite a novice, but I think I can help. In need of determining
> the path to the data, I use an indirect method: since different
> distributions have different paths, I try to locate the pg_hba.conf
> file, which resides on the same directory as your data (with the command
> "find / -name 'pg_hba.conf'" (without the double quotes) issued as root).
> But since your postmaster is running, I would rather try the following:
>
> ps auwx |grep postmaster
>
> this tells you whether it is in fact running, and if it is, tells you
> also the path where the -D flag points to.
>
> Hope this is somehow useful. Best regards,
> Barbara
>



-- 
It is from the wellspring of our despair and the places that we are
broken that we come to repair the world.
-- Murray Waas

In response to

pgsql-novice by date

Next:From: Martijn van OosterhoutDate: 2008-08-20 20:16:21
Subject: Re: Fwd: Restarting with pg_ctl, users, and passwords.
Previous:From: Barbara FigueiridoDate: 2008-08-20 19:38:41
Subject: Re: How do I determine my data dir for a created database for pg_ctl?

pgsql-general by date

Next:From: Greg SmithDate: 2008-08-20 20:03:18
Subject: Re: WAL archiving to network drive
Previous:From: Pavel StehuleDate: 2008-08-20 19:43:29
Subject: Re: function SETOF return type with variable columns?

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