-A, --auth=METHOD | Specifies the authentication method for local users used in pg_hba.conf (host and local rows). Otherwise, database initialization fails. Do not use trust, which is the default value, unless you trust all local users on your system. Otherwise, database initialization fails.
:If the value is md5, manually change the value of password_encryption_type in the postgresql.conf.sample file to 0 and comment out the parameter for the change to take effect. **gs_initdb** must be used in conjunction with **-W**. Otherwise, database initialization fails.
| Values of METHOD: - trust
- reject
- md5 (an insecure algorithm, used for compatibility with earlier versions)
- sha256
- sm3
Default value: trust |
--auth-host=METHOD | Specifies the authentication method for local users over TCP/IP used in pg_hba.conf (host rows). Otherwise, database initialization fails. This parameter value will overwrite the -A parameter value. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | Values of METHOD: - trust
- reject
- md5 (an insecure algorithm, used for compatibility with earlier versions)
- sha256
- sm3
Default value: trust |
--auth-local=METHOD | Specifies the authentication method for local users using Unix-domain socket connections used in pg_hba.conf (local rows). Otherwise, database initialization fails. This parameter value will overwrite the -A parameter value. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | Values of METHOD: - trust
- reject
- md5 (an insecure algorithm, used for compatibility with earlier versions)
- sha256
- sm3
- peer (only for the local mode)
Default value: trust |
-c, --enable-dcf | Sets the node to be installed to the DCF mode. | - |
[-D, --pgdata=]DATADIR | Specifies the data directory. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | Set DATADIR as required. The value cannot contain the following characters: | ; & $ < > ` \\ ! After the configuration is successful, a log is recorded to notify you of the value of this parameter. |
--nodename=NODENAME | Specifies the name of an initialized node. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | The naming rules for nodes are as follows: - The node name can only be lowercase letters (a-z), underscores (_), number signs (#), and digits (0-9).
- The node name must start with a lowercase letter (a-z) or underscore (_).
- The node name cannot be empty and can contain a maximum of 64 characters.
|
-E, --encoding=ENCODING | Specifies the encoding format for the database. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | - If this parameter is specified, the --locale option must be added to specify the locale that supports the encoding format. If the --locale option is not added, the system default locale is used. If the encoding format in the system default locale is inconsistent with the encoding format specified in this parameter, the database initialization failed.
- If this parameter is not specified, the encoding format of the system default locale is used. You can run the following locale commands to view the default locale and its encoding format:
omm@linux:~> locale|grep LC_CTYPE
LC_CTYPE="en_US.UTF-8"
UTF-8 indicates the encoding format of the system default locale. Otherwise, database initialization fails. - The value cannot contain the following characters: | ; & $ < > ` \\ !
|
--locale=LOCALE | Sets the default locale for the new database. You can run the locale -a command to view available locales, for example, zh_CN.gbk. If you do not want to specify a locale, set the parameter to C. Otherwise, database initialization fails. NOTICE:If the encoding format of the database is set, the encoding format of the user specified area must be consistent with the encoding format set by the user. Otherwise, database initialization fails. | The value cannot contain the following characters: | ; & $ < > ` \\ ! Otherwise, database initialization fails. For example, to set the database encoding format to GBK, perform the following steps: - Run the locale -a |grep gbk command to check the locale that supports GBK encoding:
omm@linux:~>; locale -a|grep gbk
zh_CN.gbk
zh_SG.gbk
- Add the --locale=zh_CN.gbk option when initializing the database.
|
--dbcompatibility=DBCOMPATIBILITY | Specifies the compatible database type. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | Value range: A, B, C, and PG, indicating O, MY, TD and POSTGRES databases, respectively. After the configuration is successful, a log is recorded to notify you of the value of this parameter. |
--lc-collate=LOCALE --lc-ctype=LOCALE --lc-messages=LOCALE --lc-monetary=LOCALE --lc-numeric=LOCALE --lc-time=LOCALE | Sets the specified locale for the new database. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | The values must be supported by the OS. The value cannot contain the following characters: | ; & $ < > ` \\ ! Otherwise, database initialization fails. Note:If you do not specify the --lc-collate parameter during database installation, the default parameter value is C. Otherwise, database initialization fails. |
--no-locale | Equivalent to --locale=C. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | - |
--pwfile=FILE | DuringReads the password for the database administrator from FILE during the running of gs_initdb. The first line of the file is taken as the password. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | The value ofThe format of FILE can be "a relative path+file" or "an absolute path+file". The relative path is relative to the current path. The value cannot contain the following characters: | ; & $ < > ` \\ ! After the configuration is successful, a log is recorded to notify you of the value of this parameter. |
-T, --text-search-config=CFG | Specifies the default text search mode. The value of this parameter is not verified. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | Values of text-search-config: - english: full-text search
- simple: common text search
Default value: simple |
-U, --username=NAME | Selects the username of the database administrator. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | Value range: normal database users The value cannot contain the following characters: | ; & $ < > ` \\ ! Otherwise, database initialization fails. Default value: OS user who runs gs_initdb. After the configuration is successful, a log is recorded to notify you of the value of this parameter. |
-W, --pwprompt | DuringPrompts users to enter the password of the database administrator during the running of gs_initdb. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | - |
-w, --pwpasswd=PASSWD | Specifies the password of the database administrator by running commands during the running of gs_initdb instead of interactive input. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | The password must meet the following complexity requirements: - Contain at least eight characters.
- Cannot be the same as the username, the current password (ALTER), or the current password in an inverted sequence.
- Contain at least three of the following: uppercase characters, lowercase characters, digits, and special characters (limited to ~!@#$%^&*()-_=+\|[{}];:,<.>/?).
|
-C, --enpwdfiledir=DIR | Specifies the directory where the password encrypted is located, using the AES128 encryption algorithm during the running of gs_initdb. gs_initdb decrypts the password file in this directory and performs the password complexity check on the decrypted password. The password is used as the user's password if the check passes. Note:- The decrypted password file must use gs_guc to generate gs_guc encrypt -K Gauss@123 -D Dir.
- If multiple -w and -C parameters are specified, gs_initdb regards the last -w or -C parameter as the user's requirement (entering a plaintext password or a password encrypted using AES128).
| The value cannot contain the following characters: | ; & $ < > ` \\ ! After the configuration is successful, a log is recorded to notify you of the value of this parameter. |
-X, --xlogdir=XLOGDIR | Specifies the directory where the transaction logs are stored. Otherwise, database initialization fails. The directory must be a directory where an openGauss user has the read and write permissions. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | The value must be an absolute path. The value cannot contain the following characters: | ; & $ < > ` \\ ! After the configuration is successful, a log is recorded to notify you of the value of this parameter. |
-S, --security | Initializes a database in a secure mode. After the configuration is successful, a log is recorded to notify you of the value of this parameter. | After the database is initialized using -S, the created database user permissions are restricted, and the public schema permission cannot be used any more by default. After the configuration is successful, a log is recorded to notify you of the value of this parameter. |