Alphabetical Listing of Files
initdb
Description
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.)
Usage/Options
initdb -D path [options]
Option | Description |
---|---|
-D, --pgdata path | The path to the PostgreSQL database. |
-i, --sysid=id | Specifies the UID of the ... |
Get PostgreSQL Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.