Running initdb v23
TPA first creates
postgres_data_dir if it doesn't exist and
ensures it has the correct ownership, permissions, and SELinux context.
Then, unless the directory already contains a
VERSION file, it
initdb to initialize
You can use the
to execute tasks before
postgres_data_dir is created and
run. If the hook initializes
postgres_data_dir, TPA finds the
VERSION file and therefore doesn't run
You can optionally set
postgres_initdb_opts to a list of options to
We recommend always including the
--data-checksums option, which is
included by default.
initdb, TPA sets
TZ=UTC in the environment and sets
postgres_locale you specify.
postgres_conf_dir is equal to
postgres_data_dir, and the
Postgres configuration files (
pg_hba.conf, and the include files in
conf.d) are created in the
data directory. If you change
postgres_conf_dir, after running
initdb, TPA moves the
generated configuration files to the new location.
- On this page
- Separate configuration directory