From 28125ed5e0b967b71dc9cc686a8e16e1dd9996f8 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 18 Jan 2000 00:03:37 +0000 Subject: Updated user interfaces on initdb, initlocation, pg_dump, ipcclean to a GNU-compliant'ish state. Made ipcclean work on Linux. --- doc/src/sgml/ref/initdb.sgml | 6 +- doc/src/sgml/ref/initlocation.sgml | 158 ++++++------------------------------- doc/src/sgml/ref/pg_dump.sgml | 17 +--- doc/src/sgml/ref/pg_dumpall.sgml | 8 +- 4 files changed, 35 insertions(+), 154 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml index e08ab377f9c..5f3bce4f835 100644 --- a/doc/src/sgml/ref/initdb.sgml +++ b/doc/src/sgml/ref/initdb.sgml @@ -1,5 +1,5 @@ @@ -26,7 +26,7 @@ Postgres documentation initdb [ --pgdata|-D dbdir ] [ --sysid|-i sysid ] [ --pwprompt|-W ] - [ --encoding|-e encoding ] + [ --encoding|-E encoding ] [ --pglib|-L libdir ] [ --username|-u name ] [ --noclean | -n ] [ --debug | -d ] [ --template | -t ] @@ -85,7 +85,7 @@ initdb [ --pgdata|-D dbdir ] --encoding=encoding - -e encoding + -E encoding Selects the multibyte encoding of the template database. This will also diff --git a/doc/src/sgml/ref/initlocation.sgml b/doc/src/sgml/ref/initlocation.sgml index edbc6613ed0..2a123498663 100644 --- a/doc/src/sgml/ref/initlocation.sgml +++ b/doc/src/sgml/ref/initlocation.sgml @@ -1,5 +1,5 @@ @@ -15,17 +15,15 @@ Postgres documentation initlocation - Create a secondary Postgres database storage area + Create a secondary PostgreSQL database storage area - 1999-07-20 + 2000-01-17 -initlocation [ --location=er">alble> | -D altdir ] - [ --username=name | -u name ] - [ altdir ] +initlocation directory @@ -39,45 +37,14 @@ initlocation [ --location=er">alble - --location=altdir - -D altdir - altdir + directory Where in your Unix filesystem do you want alternate databases to go? - The top level directory is called the PGDATA directory, so you - might want to point your first alternate location at - PGDATA2. - - --username=name - -u name - PGUSER - - - Who will be the Unix filesystem owner of this database storage area? - The - Postgres superuser is a Unix user - who owns all files that store the database - system and also owns the postmaster and backend processes that access them. - Usually, this is the user who should run initlocation - and who will thus have ownership of the directories and files. - - - - Only the Unix superuser can create a database system with a - different user as the Postgres superuser. - Specifying a user other than the Postgres superuser - may lead to database security and data integrity problems. Refer to the - PostgreSQL Administrator's Guide - for more information. - - - - @@ -92,65 +59,6 @@ initlocation [ --location=er">alble initlocation will create directories in the specified place. - - - - -We are initializing the database area with username postgres (uid=500). -This user will own all the files and must also own the server process. -Creating Postgres database system directory altdir -Creating Postgres database system directory altdir - - - - Successful completion. - - - - - - -We are initializing the database area with username postgres (uid=500). -This user will own all the files and must also own the server process. -Creating Postgres database system directory /usr/local/src/testlocation -mkdir: cannot make directory `altdir': Permission denied - - - - You do not have filesystem permission to write to the specified directory area. - - - - - - -Valid username not given. You must specify the username for -the Postgres superuser for the database system you are -initializing, either with the --username option or by default -to the USER environment variable. - - - - The username which you have specified is not the - Postgres superuser. - - - - - - -Can't tell what username to use. You don't have the USER -environment variable set to your username and didn't specify the ---username option - - - - Specify the command line option. - - - - - @@ -164,41 +72,16 @@ environment variable set to your username and didn't specify the initlocation - creates a new Postgres secondary database storage area. - A secondary storage area contains a required tree of directories with - the correct file permissions on those directories. - - - Creating a database storage area consists of creating the directories in which - database data might live. + creates a new PostgreSQL secondary database storage area. + See the discussion under + about how to manage and use secondary storage areas. If the argument does not contain + a slash and is not valid as a path, it is assumed to be an environment variable, + which is referenced. See the examples at the end. - There are two kinds of arguments for initlocation. - - First, you can specify an environment variable (e.g. PGDATA2). - This environment variable should be known to the backend for later use in - CREATE DATABASE/WITH LOCATION - or - createdb -D altdir. - However, the backend daemon must have this variable in it's - environment for this to succeed. - - Second, you may be able to specify an explicit - absolute path to the top directory of the storage area. However,this second - option is possible only if explicitly enabled during the - Postgres installation. It is usually disabled - to alleviate security and data integrity concerns. + In order to use this command you must be logged in (using 'su', for example) + the database superuser. - - - Postgres will add /base/ - to the specified path to create the storage area. - - - The backend requires that any argument to which is - in all uppercase and which has no path delimiters is an environment variable. - - @@ -210,12 +93,19 @@ environment variable set to your username and didn't specify the To create a database in an alternate location, using an environment variable: + +$ export PGDATA2=/opt/postgres/data +$ initlocation PGDATA2 +$ createdb 'testdb' -D 'PGDATA2/testdb' + + - -% setenv PGDATA2 /opt/postgres/data -% initlocation PGDATA2 -% createdb -D PGDATA2 - + + Alternatively, if you allow absolute paths you could write: + +$ initlocation /opt/postgres/data +$ createdb 'testdb' -D '/opt/postgres/data/testdb' + diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index a11a366b435..d8f6bb6b57e 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -1,5 +1,5 @@ @@ -25,9 +25,9 @@ Postgres documentation pg_dump [ dbname ] pg_dump [ -h host ] [ -p port ] - [ -t table ] [ -f outputfile ] + [ -t table ] [ -a ] [ -c ] [ -d ] [ -D ] [ -n ] [ -N ] - [ -o ] [ -s ] [ -u ] [ -v ] [ -x ] + [ -O ] [ -s ] [ -u ] [ -v ] [ -x ] [ dbname ] @@ -92,15 +92,6 @@ pg_dump [ -h host ] [ -p - - -f filename - - - Specifies the output file. Defaults to stdout. - - - - -n @@ -124,7 +115,7 @@ pg_dump [ -h host ] [ -p - -o + -O Dump object identifiers (OIDs) for every table. diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml index b604ed6c55b..cfe3b62f7f3 100644 --- a/doc/src/sgml/ref/pg_dumpall.sgml +++ b/doc/src/sgml/ref/pg_dumpall.sgml @@ -1,5 +1,5 @@ @@ -24,7 +24,7 @@ Postgres documentation pg_dumpall -pg_dumpall [ -h host ] [ -p port ] [ -a ] [ -d ] [ -D ] [ -o ] [ -s ] [ -u ] [ -v ] [ -x ] +pg_dumpall [ -h host ] [ -p port ] [ -a ] [ -d ] [ -D ] [ -O ] [ -s ] [ -u ] [ -v ] [ -x ] @@ -77,7 +77,7 @@ pg_dumpall [ -h host ] [ -p - -o + -O Dump object identifiers (OIDs) for every table. @@ -277,7 +277,7 @@ dumpSequence(table): SELECT failed To dump all databases: -% pg_dumpall -o > db.out +% pg_dumpall > db.out -- cgit v1.2.3