Initdb windows


















In this case we enforced our data to have UTF-8 encoding. Once we successfully create the database server, we will start the PostgreSQL server by issuing the following command in the command prompt. The pgAdmin4 is a browser based graphical user interface to interact with the PostgreSQL database server. Under the Servers tree node to the extreme left, right click on the node, choose create and click on Server… to create a new server.

Under General tab of the Create — Server wizard, specify the name of the server you want to create. This could be any noticeable name of your choice or something that might indicate the logical name of the data that the database server holds.

Input the username and password with the credentials you gave while initializing the database server using initdb command. Locate and right click on the database node of the PostgreSQL server. Choose create and then click on Database …. In the General tab of the Create — Database wizard, give a name of your choice to be set for the new database being created. Feel free to modify the encoding in the Definition tab of the wizard.

By default it will be set to UTF-8 as per the definition of our initdb command arguments. For these reasons it is important to choose the right locale when running initdb. The remaining locale categories can be changed later when the server is started. You can also use --locale to set the default for all locale categories, including collation order and character set classes. More details can be found in Section To alter the default encoding, use the --encoding.

Do not use trust unless you trust all local users on your system. This is the only information required by initdb , but you can avoid writing it by setting the PGDATA environment variable, which can be convenient since the database server postgres can find the database directory later by the same variable.

This will also be the default encoding of any database you create later, unless you override it there. Enabling checksums may incur a noticeable performance penalty. If set, checksums are calculated for all objects, in all databases. If this option is not specified, the locale is inherited from the environment that initdb runs in. Locale support is described in Section This option causes initdb to return without waiting, which is faster, but means that a subsequent operating system crash can leave the data directory corrupt.

To alter the default collation order or character set classes, use the --lc-collate and --lc-ctype options. For these reasons it is important to choose the right locale when running initdb. The remaining locale categories can be changed later when the server is started. You can also use --locale to set the default for all locale categories, including collation order and character set classes. More details can be found in Section To alter the default encoding, use the --encoding.

Do not use trust unless you trust all local users on your system. 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 by setting the PGDATA environment variable, which can be convenient since the database server postgres can find the database directory later by the same variable.

Selects the encoding of the template database. This will also be the default encoding of any database you create later, unless you override it there.

Allows users in the same group as the cluster owner to read all cluster files created by initdb. Enabling checksums may incur a noticeable performance penalty. If set, checksums are calculated for all objects, in all databases. 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 described in Section Generally, this option is useful for testing, but should not be used when creating a production installation. Makes initdb read the database superuser's password from a file. The first line of the file is taken as the password. Safely write all database files to disk and exit. This does not perform any of the normal initdb operations. Sets the default text search configuration. Selects the user name of the database superuser.

This defaults to the name of the effective user running initdb. It is really not important what the superuser's name is, but one might choose to keep the customary name postgres , even if the operating system user's name is different.

Makes initdb prompt for a password to give the database superuser. If you don't plan on using password authentication, this is not important. Otherwise you won't be able to use password authentication until you have a password set up. 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 catalog tables.



0コメント

  • 1000 / 1000