Sunday, November 6, 2011

Postgresql Server Management

[pgsql-9.0] cd bin
[bin] cd /usr/local/pgsql-9.0/bin
[bin] initdb /Users/javapro/dev/database/postgres_data/petstore
The files belonging to this database system will be owned by user "javapro".
This user must also own the server process.
. . . 
Success. You can now start the database server using:

    postgres -D /Users/javapro/dev/database/postgres_data/petstore
or
    pg_ctl -D /Users/javapro/dev/database/postgres_data/petstore -l logfile start

[bin] pg_ctl -D /Users/javapro/dev/database/postgres_data/petstore -l logfile start
server starting
Manage the server using other options of pg_ctl
pg_ctl start [-w] [-t seconds] [-s] [-D datadir] [-l filename] [-o options] [-p path] [-c]
pg_ctl stop [-W] [-t seconds] [-s] [-D datadir] [-m s[mart] | f[ast] | i[mmediate] ]
pg_ctl restart [-w] [-t seconds] [-s] [-D datadir] [-c] [-m s[mart] | f[ast] | i[mmediate] ] [-o options]
pg_ctl reload [-s] [-D datadir]
pg_ctl status [-D datadir]
pg_ctl kill signal_name process_id
pg_ctl register [-N servicename] [-U username] [-P password] [-D datadir] [-w] [-t seconds] [-s] [-o options]
pg_ctl unregister [-N servicename]


Blog Archive