salt.states.postgres_initdb

Initialization of PostgreSQL data directory

The postgres_initdb module is used to initialize the postgresql data directory.

New in version 2016.3.0.

pgsql-data-dir:
  postgres_initdb.present:
    - name: /var/lib/pgsql/data
    - auth: password
    - user: postgres
    - password: strong_password
    - encoding: UTF8
    - locale: C
    - runas: postgres
salt.states.postgres_initdb.present(name, user=None, password=None, auth=u'password', encoding=u'UTF8', locale=None, runas=None, waldir=None, checksums=False)

Initialize the PostgreSQL data directory

name
The name of the directory to initialize
user
The database superuser name
password
The password to set for the postgres user
auth
The default authentication method for local connections
encoding
The default encoding for new databases
locale
The default locale for new databases
waldir

The transaction log (WAL) directory (default is to keep WAL inside the data directory)

New in version Fluorine.

checksums

If True, the cluster will be created with data page checksums.

Note

Data page checksums are supported since PostgreSQL 9.3.

New in version Fluorine.

runas
The system user the operation should be performed on behalf of