-A, --auth=METHOD | Specifies the authentication method for local users used in pg_hba.conf (host and local rows). Do not use trust, which is the default value, unless you trust all local users on your system.
NOTICE: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.
| Values of METHOD: - trust
- reject
- md5 (an insecure algorithm, used for compatibility with earlier versions)
- sha256
Default value: trust |
--auth-host=METHOD | Specifies the authentication method for local users over TCP/IP used in pg_hba.conf (host rows). The value specified in the -A parameter is overwritten when this parameter is specified. | Values of METHOD: - trust
- reject
- md5 (an insecure algorithm, used for compatibility with earlier versions)
- sha256
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). The value specified in the -A parameter is overwritten when this parameter is specified. | Values of METHOD: - trust
- reject
- md5 (an insecure algorithm, used for compatibility with earlier versions)
- sha256
Default value: trust |
[-D, --pgdata=]DATADIR | Specifies the data directory. | Set DATADIR as required. |
--nodename=NODENAME | Specifies the name of an initialized node. | The naming rules for nodes are as follows: - The node name can only be lowercase letters (a-z), underscores (_), number signs (#), digits (0-9), and dollar signs ($).
- The node name must start with a lowercase letter (a-z), or underscore (_).
- The nodename cannot be an empty string, and cannot exceed 64 characters.
|
-E, --encoding=ENCODING | Specifies the encoding format for a new database. | |
--locale=LOCALE | Specifies 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. 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. | 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 the database is initialized.
|
--dbcompatibility=DBCOMPATIBILITY | Specifies the type of the compatible database. | Value range: A, B, and C , indicating O, MY, and TD databases, respectively. |
--lc-collate=LOCALE --lc-ctype=LOCALE --lc-messages=LOCALE --lc-monetary=LOCALE --lc-numeric=LOCALE --lc-time=LOCALE | Sets the specified locale for a new database. | The parameter values must be supported by the OS. NOTE:If the --lc-collate parameter is not specified when the database is installed, the default value of --lc-collate is C. |
--no-locale | Equivalent to --locale=C. | - |
--pwfile=FILE | Reads the password for the database administrator from FILE during the running of gs_initdb. The first row of the file is taken as the password. | The format of FILE can be "a relative path+file" or "an absolute path+file". The relative path is relative to the current path. |
-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: - pg_catalog.english: full-document search
- pg_catalog.simple: common text search
Default value: pg_catalog.simple |
-U, --username=NAME | Selects the username of the database administrator. | Value range: normal database users Default value: OS user who runs gs_initdb |
-W, --pwprompt | Prompts users to enter the password for the database administrator during the running of gs_initdb. | - |
-w, --pwpasswd=PASSWD | Specifies the password of the database administrator by running commands during the running of gs_initdb instead of interactive input. | 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 (A to Z), lowercase characters (a to z), digits (0 to 9), and other 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 plain-text password or a password encrypted using AES128).
| - |
-X, --xlogdir=XLOGDIR | Specifies the directory where the transaction logs are stored. The directory must be a directory where an openGauss user has the read and write permissions. | The value must be an absolute path. |
-S, --security | Initializes a database in a secure mode. | 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. |