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:

  1. Create the directory to hold the data as root.

  2. Use chown to change ownership of the directory to the DBA user.

  3. Use login (or su) to log in to the DBA user account.

  4. Execute initdb with appropriate options.

  5. initdb will generate the shared catalog tables.

  6. 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.