[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: where are the data and log folders of postgresql 8.3 on debian sid?



On Sat, Dec 06, 2008 at 12:17:40PM +0800, ????????? wrote:
> On Sat, Dec 6, 2008 at 11:42 AM, Ken Irving <fnkci@uaf.edu> wrote:
> > On Fri, Dec 05, 2008 at 06:28:03PM -0900, Ken Irving wrote:
> >> On Sat, Dec 06, 2008 at 10:03:04AM +0800, ????????? wrote:
> >> > I have installed postgresql 8.3 from debian package, and i'm reading
> >> > the official document from postgresql, the document says after
> >> > installing the database, it needs to create data folder and specify
> >> > log file to initiate the database, like this:
> >> > ---------------
> >> > mkdir /usr/local/pgsql/data
> >> > chown postgres /usr/local/pgsql/data
> >> > su - postgres
> >> > /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
> >> > /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
> >> > -----------------
> >> > but i cannot find the folder in my debian installation, i think they
> >> > are at some location else, where is it? thanks
> >
> > Taking another look at this, the instructions show to create a
> > directory for your data owned by the postgres user, and then to
> > run a couple of commands on it, initdb and postgres.  My guess
> > would be that those would be found in /usr/bin/ and so in the
> > root user's path, but in any case should be in some bin/ directory
> > somewhere.
> >
> > Some things to try...
> >
> >    man initdb
> >    man postgres
> >    man -k postgres
> >    dpgk -L PACKAGE_NAME | grep bin/
> >
> > Or wait a day and use locate initdb, if for some reason you want to know
> > where it is.  Maybe there's something under /var/, e.g., if the debian
> > package has configured a default location for the database.
> >
> > In any case, you're not starting from scratch (as the upstream docs
> > probably assume), you're using debian!
> >
> >
> thank you for your advice, i found in the /etc/postgresql:
> ---------------
>  data_directory = '/var/lib/postgresql/8.3/main'
> ---------------
> and i found the /var/log/postgresql
> i hope i'm right :)

It turns out I have postgres installed on one system (not sure why...).
I did:

    $ ls /usr/share/doc/postgresql-common/README.De*
    README.Debian.gz  README.Devel      
    $ zless /usr/share/doc/postgresql-common/README.Debian.gz 

which says in part:

    PostgreSQL for Debian
    =====================
    ...
    First steps for the impatient
    -----------------------------
    Eventually you will not get around reading at least some parts of
    the manual, but if you want to get straight into playing SQL, here
    are the steps to create a database user and a database for the Unix
    user 'joe':

    1. ...

Those look to me like some potentially useful instructions if you're
trying to get started (without reading the fine manual...).

Ken

-- 
Ken Irving


Reply to: