Table of Contents Previous Next


6 Reference – Command Line Options

You can optionally include the following parameters for an PostgreSQL installation on the command line, or in a configuration file when invoking the PostgreSQL installer.
Use the --create_shortcuts parameter to specify whether menu shortcuts should be created. Default is yes.
--datadir data_directory
Use the --datadir parameter to specify a location for the cluster's data directory. data_directory is the name of the directory; include the complete path to the desired directory.
Use the --debuglevel parameter to set the level of detail written to the debug_log file (see --debugtrace). Higher values produce more detail (and a longer trace file). The default is 2.
--debugtrace debug_log
Use the --debugtrace parameter to troubleshoot installation problems. debug_log is the name of the file that contains installation troubleshooting details.
You can use the --disable-stackbuilder parameter to indicate that the installer should not create an entry for the Stack Builder utility on the Application menu, or offer to launch StackBuilder when the installation completes. For more information about Stack Builder, see Section 4, Using Stack Builder.
Include the --extract-only parameter to indicate that the installer should extract the PostgreSQL binaries without performing an installation. Superuser privileges are not required for the --extract-only option. The default value is no.
Include the --help parameter to view a list of the optional parameters.
Include the --installer-language parameter to specify an installation language. The following values are supported:
en (English)
es (Spanish)
fr (French)
The default is en (English).
Include --install_plpgsql to specify whether the installer should install pl/pgsql in template1. Default is yes.
Windows only. Include --install_runtimes to specify whether the installer should install the Microsoft Visual C++ runtime libraries. Default is yes.
--locale locale
Use the --mode parameter to specify an installation mode. The following modes are supported:
qt – Specify qt to tell the installer to use the Qt graphical toolkit
gtk – Specify gtk to tell the installer to use the GTK graphical toolkit.
xwindow – Specify xwindow tell the installer to use the X Window graphical toolkit.
text – Specify text to perform a text mode installation in a console window. This is a Linux-only option.
unattended – Specify unattended to specify that the installer should perform an installation that requires no user input during the installation process.
--optionfile config_file
Use the --optionfile parameter to specify the name of a file that contains the installation configuration parameters. config_file must specify the complete path to the configuration parameter file.
--prefix installation_dir
Use the --prefix parameter to specify an installation directory for PostgreSQL. The default installation directory on a Linux or Mac system is:
--serverport port_number
Use the --serverport parameter to specify a listener port number for PostgreSQL.
If you are installing PostgreSQL in unattended mode, and do not specify a value using the --serverport parameter, the installer will use port 5432, or the first available port after port 5432 as the default listener port.
--serviceaccount user_account_name
Use the --serviceaccount parameter to specify the name of the user account that owns the server process. The default value of ‑serviceaccount is set to postgres.
Please note that for security reasons, the --serviceaccount parameter must specify the name of an account that does not hold administrator privileges.
--servicename service_name
Use the --servicename parameter to specify the name of the PostgreSQL service. The default is postgresql-9.5.
--servicepassword user_password
Windows only. Use --servicepassword to specify the OS system password. If unspecified, the value of --servicepassword defaults to the value of ‑‑superpassword.
--superaccount super_user_name
Use the --superaccount parameter to specify the user name of the database superuser. The default value of ‑superaccount is set to postgres.
--superpassword superuser_password
Use --superpassword to specify the database superuser password. If you are installing in non-interactive mode, ‑‑superpassword defaults to postgres.
Use the --unattendedmodeui parameter to specify the installer's behavior during an unattended installation.
Include --unattendedmodeui none to specify that the installer should not display progress bars during the PostgreSQL installation.
Include --unattendedmodeui minimal to specify that the installer should display progress bars during the installation process. This is the default behavior.
Include --unattendedmodeui minimalWithDialogs to specify that the installer should display progress bars and report any errors encountered during the installation process (in additional dialogs).
Include the --version parameter to retrieve version information about the installer:

6 Reference – Command Line Options

Table of Contents Previous Next