Specifying cluster options with INITDBOPTS v16

You can use the INITDBOPTS variable to specify your cluster configuration preferences. By default, the INITDBOPTS variable is commented out in the service configuration file. Unless you modify it, when you run the service startup script, the new cluster is created in a mode compatible with Oracle databases. Clusters created in this mode contain a database named edb and have a database superuser named enterprisedb.

Initializing the cluster in Oracle mode

If you initialize the database using Oracle-compatibility mode, the installation includes:

  • Data dictionary views compatible with Oracle databases.
  • Oracle data type conversions.
  • Date values displayed in a format compatible with Oracle syntax.
  • Support for Oracle-styled concatenation rules. If you concatenate a string value with a NULL value, the returned value is the value of the string.
  • Support for the following Oracle built-in packages.
PackageFunctionality compatible with Oracle databases
dbms_alertProvides the capability to register for, send, and receive alerts.
dbms_jobProvides the capability to create, schedule, and manage jobs.
dbms_lobProvides the capability to manage on large objects.
dbms_outputProvides the capability to send messages to a message buffer or get messages from the message buffer.
dbms_pipeProvides the capability to send messages through a pipe within or between sessions connected to the same database cluster.
dbms_rlsEnables the implementation of Virtual Private Database on certain EDB Postgres Advanced Server database objects.
dbms_sqlProvides an application interface to the EDB dynamic SQL functionality.
dbms_utilityProvides various utility programs.
dbms_aqadmProvides supporting procedures for Advanced Queueing functionality.
dbms_aqProvides message queueing and processing for EDB Postgres Advanced Server.
dbms_profilerCollects and stores performance information about the PL/pgSQL and SPL statements that are executed during a performance profiling session.
dbms_randomProvides a number of methods to generate random values.
dbms_redactEnables redacting or masking data that's returned by a query.
dbms_lockProvides support for the DBMS_LOCK.SLEEP procedure.
dbms_schedulerProvides a way to create and manage jobs, programs, and job schedules.
dbms_cryptoProvides functions and procedures to encrypt or decrypt RAW, BLOB, or CLOB data. You can also use DBMS_CRYPTO functions to generate cryptographically strong random values.
dbms_mviewProvides a way to manage and refresh materialized views and their dependencies.
dbms_sessionProvides support for the DBMS_SESSION.SET_ROLE procedure.
utl_encodeProvides a way to encode and decode data.
utl_httpProvides a way to use the HTTP or HTTPS protocol to retrieve information found at a URL.
utl_fileProvides the capability to read from and write to files on the operating system’s file system.
utl_smtpProvides the capability to send emails over the Simple Mail Transfer Protocol (SMTP).
utl_mailProvides the capability to manage email.
utl_urlProvides a way to escape illegal and reserved characters in a URL.
utl_rawProvides a way to manipulate or retrieve the length of raw data types.

Initializing the cluster in Postgres mode

Clusters created in PostgreSQL mode don't include compatibility features. To create a new cluster in PostgreSQL mode, remove the pound sign (#) in front of the INITDBOPTS variable, which enables the --no-redwood-compat option. Clusters created in PostgreSQL mode contain a database named postgres and have a database superuser named postgres.

You can also specify multiple initdb options. For example, the following statement creates a database cluster without compatibility features for Oracle. The cluster contains a database named postgres that's owned by a user named alice. The cluster uses UTF-8 encoding.

INITDBOPTS="--no-redwood-compat -U alice --locale=en_US.UTF-8"

If you initialize the database using --no-redwood-compat mode, the installation includes the following packages.

PackageFunctionality noncompatible with Oracle databases
dbms_aqadmProvides supporting procedures for Advanced Queueing functionality.
dbms_aqProvides message queueing and processing for EDB Postgres Advanced Server.
edb_bulkloadProvides direct/conventional data loading capability when loading huge amount of data into a database.
edb_genProvides miscellaneous packages to run built-in packages.
edb_objectsProvides Oracle-compatible objects such as packages and procedures.
waitstatesProvides monitor session blocking.
edb_dblink_libpqProvides link to foreign databases by way of libpq.
edb_dblink_ociProvides link to foreign databases by way of OCI.
snap_tablesCreates tables to hold wait information. Included with DRITA scripts.
snap_functionsCreates functions to return a list of snap ids and the time the snapshot was taken. Included with DRITA scripts.
sys_statsProvides OS performance statistics.

In addition to the cluster configuration options documented in the PostgreSQL core documentation, EDB Postgres Advanced Server supports the following initdb options:

--no-redwood-compat

Include the --no-redwood-compat keywords to create the cluster in PostgreSQL mode. When the cluster is created in PostgreSQL mode, the name of the database superuser is postgres, and the name of the default database is postgres. The few EDB Postgres Advanced Server features compatible with Oracle databases are available with this mode. However, we recommend using the EDB Postgres Advanced Server in redwood compatibility mode to use all its features.

--redwood-like

Include the --redwood-like keywords to use an escape character. The character is an empty string ('') and it follows the LIKE (or PostgreSQL-compatible ILIKE) operator in a SQL statement that's compatible with Oracle syntax.

--icu-short-form

Include the --icu-short-form keywords to create a cluster that uses a default International Components for Unicode (ICU) collation for all databases in the cluster. For more information about Unicode collations, see Unicode collation algorithm.

For more information about using initdb and the available cluster configuration options, see the PostgreSQL core documentation.

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.