From a2405d5554e1cf85d554fe7d99612023ed813ab7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 20 Jan 2001 22:09:24 +0000 Subject: Get rid of initdb -t bugs by the simple expedient of getting rid of initdb -t. This option is obsoleted by 7.1's ability to drop and recreate template1 during normal operation. --- doc/src/sgml/ref/initdb.sgml | 56 +++++++++++++++----------------------------- 1 file changed, 19 insertions(+), 37 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml index 09caea13146..954a48c16ac 100644 --- a/doc/src/sgml/ref/initdb.sgml +++ b/doc/src/sgml/ref/initdb.sgml @@ -1,5 +1,5 @@ @@ -41,7 +41,6 @@ Postgres documentation -L directory --noclean-n --debug-d - --template-t @@ -58,8 +57,8 @@ Postgres documentation Creating a database system consists of creating the directories in which the database data will live, generating the shared catalog tables - (tables that do not belong to any particular database), and - creating the template1 + (tables that belong to the whole cluster rather than to any particular + database), and creating the template1 database. When you create a new database, everything in the template1 database is copied. It contains catalog tables filled in for things like the @@ -67,8 +66,9 @@ Postgres documentation - You must not execute initdb as root. This is - because you cannot run the database server as root either, but the + You must not execute initdb as root; it must + be run by the Unix user account that will run the database server. + This is because you cannot run the database server as root either, but the server needs to have access to the files initdb creates. Furthermore, during the initialization phase, when there are no users and no access controls installed, Postgres @@ -78,10 +78,14 @@ Postgres documentation - Although initdb will attempt to create the respective - data directory, chances are that it won't have the permission to do so. Thus - it is a good idea to create the data directory before running initdb - and to hand over the ownership of it to the database superuser. + Although initdb will attempt to create the + specified data directory, often it won't have permission to do so, + since the parent of the desired data directory is often a root-owned + directory. To set up an arrangement like this, create an empty data + directory as root, then use chown to hand over + ownership of that directory to the database user account, then + su to become the database user, and + finally run initdb as the database user. @@ -96,7 +100,7 @@ Postgres documentation This option specifies where in the file system the database should be stored. This is the only information required by - initdb, but you can avoid it by + initdb, but you can avoid writing it by setting the PGDATA environment variable, which can be convenient since the database server (postmaster) can find the database @@ -125,7 +129,7 @@ Postgres documentation Makes initdb prompt for a password - of the database superuser. If you don't plan on using password + to give the database superuser. If you don't plan on using password authentication, this is not important. Otherwise you won't be able to use password authentication until you have a password set up. @@ -166,28 +170,6 @@ Postgres documentation - - --template - -t - - - Replace the template1 - database in an existing database system, and don't touch anything else. - This is useful when you need to upgrade your template1 - database using initdb - from a newer release of Postgres, - or when your template1 - database has become corrupted by some system problem. Normally the - contents of template1 - remain constant throughout the life of the database system. You can't - destroy anything by running initdb - with the - - option. - - - - --noclean -n @@ -195,8 +177,8 @@ Postgres documentation By default, when initdb determines that an error prevented it from completely creating the database - system, it removes any files it may have created before determining - that it can't finish the job. This option inhibits any tidying-up and is + system, it removes any files it may have created before discovering + that it can't finish the job. This option inhibits tidying-up and is thus useful for debugging. @@ -211,7 +193,7 @@ Postgres documentation messages of lesser interest for the general public. The bootstrap backend is the program initdb uses to create the catalog tables. This option generates a tremendous - amount of output. + amount of extremely boring output. -- cgit v1.2.3