Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Category index802
hostaddrhostaddr
Numeric IP address of host to connect to. This should be in the standard IPv4 address format, e.g., 172.28.40.9. If your machine supports IPv6, you can also use those addresses. TCP…Database Connection Control Functions › Parameter Key Words
initdbinitdb initdb — create a new PostgreSQL database cluster
Synopsis initdb [option...] [ --pgdata | -D ] directoryinitdb
initdb --allow-group-access-g--allow-group-access
Allows users in the same group as the cluster owner to read all cluster files created by initdb. This option is ignored on Windows as it does not support POSIX-style g…initdb › Options
initdb --auth-host=authmethod--auth-host=authmethod
This option specifies the authentication method for local users via TCP/IP connections used in pg_hba.conf (host lines).initdb › Options
initdb --auth-local=authmethod--auth-local=authmethod
This option specifies the authentication method for local users via Unix-domain socket connections used in pg_hba.conf (local lines).initdb › Options
initdb --auth=authmethod-A authmethod--auth=authmethod
This option specifies the default authentication method for local users used in pg_hba.conf (host and local lines). See Section 20.1 for an overview of valid v…initdb › Options
initdb --builtin-locale=locale--builtin-locale=locale
Specifies the locale name when the builtin provider is used. Locale support is described in Section 23.1.initdb › Options
initdb --data-checksums-k--data-checksums
Use checksums on data pages to help detect corruption by the I/O system that would otherwise be silent. This is enabled by default; use --no-data-checksums to disable chec…initdb › Options
initdb --debug-d--debug
Print debugging output from the bootstrap backend and a few other messages of lesser interest for the general public. The bootstrap backend is the program initdb uses to create the…initdb › Options
initdb --discard-caches--discard-caches
Run the bootstrap backend with the debug_discard_caches=1 option. This takes a very long time and is only of use for deep debugging.initdb › Options
initdb --encoding=encoding-E encoding--encoding=encoding
Selects the encoding of the template databases. This will also be the default encoding of any database you create later, unless you override it then. The chara…initdb › Options
initdb --help-?--help
Show help about initdb command line arguments, and exit.initdb › Options
initdb --icu-locale=locale--icu-locale=locale
Specifies the ICU locale when the ICU provider is used. Locale support is described in Section 23.1.initdb › Options
initdb --icu-rules=rules--icu-rules=rules
Specifies additional collation rules to customize the behavior of the default collation. This is supported for ICU only.initdb › Options
initdb --lc-time=locale--lc-collate=locale--lc-ctype=locale--lc-messages=locale--lc-monetary=locale--lc-numeric=locale--lc-time=locale
Like --locale, but only sets the locale in the specified category.initdb › Options
initdb --locale-provider={builtin|libc|icu}--locale-provider={builtin|libc|icu}
This option sets the locale provider for databases created in the new cluster. It can be overridden in the CREATE DATABASE command when new databases are…initdb › Options
initdb --locale=locale--locale=locale
Sets the default locale for the database cluster. If this option is not specified, the locale is inherited from the environment that initdb runs in. Locale support is describ…initdb › Options
initdb --no-clean-n--no-clean
By default, when initdb determines that an error prevented it from completely creating the database cluster, it removes any files it might have created before discovering that i…initdb › Options
initdb --no-data-checksums--no-data-checksums
Do not enable data checksums.initdb › Options
initdb --no-instructions--no-instructions
By default, initdb will write instructions for how to start the cluster at the end of its output. This option causes those instructions to be left out. This is primarily in…initdb › Options
initdb --no-locale--no-locale
Equivalent to --locale=C.initdb › Options
initdb --no-sync-N--no-sync
By default, initdb will wait for all files to be written safely to disk. This option causes initdb to return without waiting, which is faster, but means that a subsequent operati…initdb › Options
initdb --no-sync-data-files--no-sync-data-files
By default, initdb safely writes all database files to disk. This option instructs initdb to skip synchronizing all files in the individual database directories, the dat…initdb › Options
initdb --pgdata=directory-D directory--pgdata=directory
This option specifies the directory where the database cluster should be stored. This is the only information required by initdb, but you can avoid writing it …initdb › Options
initdb --pwfile=filename--pwfile=filename
Makes initdb read the bootstrap superuser's password from a file. The first line of the file is taken as the password.initdb › Options
initdb --pwprompt-W--pwprompt
Makes initdb prompt for a password to give the bootstrap superuser. If you don't plan on using password authentication, this is not important. Otherwise you won't be able to use…initdb › Options
initdb --set name=value-c name=value--set name=value
Forcibly set the server parameter name to value during initdb, and also install that setting in the generated postgresql.conf file, so that it will apply during…initdb › Options
initdb --show-s--show
Show internal settings and exit, without doing anything else. This can be used to debug the initdb installation.initdb › Options
initdb --sync-method=method--sync-method=method
When set to fsync, which is the default, initdb will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links fo…initdb › Options
initdb --sync-only-S--sync-only
Safely write all database files to disk and exit. This does not perform any of the normal initdb operations. Generally, this option is useful for ensuring reliable recovery aft…initdb › Options
initdb --text-search-config=config-T config--text-search-config=config
Sets the default text search configuration. See default_text_search_config for further information.initdb › Options
initdb --username=username-U username--username=username
Sets the user name of the bootstrap superuser. This defaults to the name of the operating-system user running initdb.initdb › Options
initdb --version-V--version
Print the initdb version and exit.initdb › Options
initdb --wal-segsize=size--wal-segsize=size
Set the WAL segment size, in megabytes. This is the size of each individual file in the WAL log. The default size is 16 megabytes. The value must be a power of 2 between 1…initdb › Options
initdb --waldir=directory-X directory--waldir=directory
This option specifies the directory where the write-ahead log should be stored.initdb › Options
initdb -L directory-L directory
Specifies where initdb should find its input files to initialize the database cluster. This is normally not necessary. You will be told if you need to specify their location exp…initdb › Options
krbsrvnamekrbsrvname
Kerberos service name to use when authenticating with GSSAPI. This must match the service name specified in the server configuration for Kerberos authentication to succeed. (See a…Database Connection Control Functions › Parameter Key Words
load_balance_hostsload_balance_hosts
Controls the order in which the client tries to connect to the available hosts and addresses. Once a connection attempt is successful no other hosts and addresses will be …Database Connection Control Functions › Parameter Key Words
max_protocol_versionmax_protocol_version
Specifies the protocol version to request from the server. The default is to use version 3.0 of the PostgreSQL protocol, unless the connection string specifies a feature…Database Connection Control Functions › Parameter Key Words
min_protocol_versionmin_protocol_version
Specifies the minimum protocol version to allow for the connection. The default is to allow any version of the PostgreSQL protocol supported by libpq, which currently me…Database Connection Control Functions › Parameter Key Words
More results
Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.
pg17: choose a version ex: extensions only ↑↓ select ↵ open