October 2001
Beginner to intermediate
400 pages
7h 45m
English
The initdb command is used to prepare a directory location for a new PostgreSQL system. The initdb command is usually performed with several other steps, as briefly outlined here:
Create the directory to hold the data as root.
Use chown to change ownership of the directory to the DBA user.
Use login (or su) to log in to the DBA user account.
Execute initdb with appropriate options.
initdb will generate the shared catalog tables.
initdb will generate the template1 database. (Each time you create a new database, it is generated from template1.)
initdb -D path [options]
| Option | Description |
|---|---|
| -D, --pgdata path | The path to the PostgreSQL database. |
| -i, --sysid=id | Specifies the UID of the ... |
Read now
Unlock full access