5.4 Using initdb to Create a Cluster

Table of Contents Previous Next


5 Managing an Advanced Server Installation : 5.4 Using initdb to Create a Cluster

The PostgreSQL initdb command creates a database cluster. If you are using the graphical installer to install Advanced Server, the installer will invoke initdb to create a cluster for you. If you are using an RPM package to install Advanced Server, you must manually configure the service and invoke initdb to create your cluster; for more information, see Section 3.2.
When invoking initdb, you can:
Use the service command on RHEL or CentOS 6.x, and the service configuration file to configure the environment.
Use the systemd service manager on RHEL or CentOS 7.x and the service configuration file to configure the environment.
For example, to invoke initdb on a RHEL or CentOS 7.x system, using the options specified in the service configuration file, assume the identity of the operating system superuser:
Then, invoke initdb:
After creating the cluster, use systemctl to start, stop, or restart the service:
Advanced Server includes the following initdb options that allow you to customize your clusters.
Include the --no-redwood-compat keywords to instruct the server to create the cluster in PostgreSQL mode. When the cluster is created in PostgreSQL mode, the name of the database superuser will be postgres, the name of the default database will be postgres, and Advanced Server’s features compatible with Oracle databases will not be available to the cluster.
Include the --redwood-like keywords to instruct the server to use an escape character (an empty string ('')) following the LIKE (or PostgreSQL-compatible ILIKE) operator in a SQL statement that is compatible with Oracle syntax.
Include the --icu-short-form keywords to create a cluster that uses a default ICU (International Components for Unicode) collation for all databases in the cluster. For more information about Unicode collations, please refer to the EDB Postgres Advanced Server Guide available at:
For more information about using initdb, see the PostgreSQL Core Documentation available at:
You can also view online help for initdb by assuming superuser privileges and entering:
/path_to_initdb_installation_directory/initdb --help
Where path_to_initdb_installation_directory specifies the location of the initdb binary file.

5 Managing an Advanced Server Installation : 5.4 Using initdb to Create a Cluster

Table of Contents Previous Next