Specifying cluster options with INITDBOPTS v17
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.
Package | Functionality compatible with Oracle databases |
---|---|
dbms_alert | Provides the capability to register for, send, and receive alerts. |
dbms_job | Provides the capability to create, schedule, and manage jobs. |
dbms_lob | Provides the capability to manage on large objects. |
dbms_output | Provides the capability to send messages to a message buffer or get messages from the message buffer. |
dbms_pipe | Provides the capability to send messages through a pipe within or between sessions connected to the same database cluster. |
dbms_rls | Enables the implementation of Virtual Private Database on certain EDB Postgres Advanced Server database objects. |
dbms_sql | Provides an application interface to the EDB dynamic SQL functionality. |
dbms_utility | Provides various utility programs. |
dbms_aqadm | Provides supporting procedures for Advanced Queueing functionality. |
dbms_aq | Provides message queueing and processing for EDB Postgres Advanced Server. |
dbms_profiler | Collects and stores performance information about the PL/pgSQL and SPL statements that are executed during a performance profiling session. |
dbms_random | Provides a number of methods to generate random values. |
dbms_redact | Enables redacting or masking data that's returned by a query. |
dbms_lock | Provides support for the DBMS_LOCK.SLEEP procedure. |
dbms_scheduler | Provides a way to create and manage jobs, programs, and job schedules. |
dbms_crypto | Provides 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_mview | Provides a way to manage and refresh materialized views and their dependencies. |
dbms_session | Provides support for the DBMS_SESSION.SET_ROLE procedure. |
utl_encode | Provides a way to encode and decode data. |
utl_http | Provides a way to use the HTTP or HTTPS protocol to retrieve information found at a URL. |
utl_file | Provides the capability to read from and write to files on the operating system’s file system. |
utl_smtp | Provides the capability to send emails over the Simple Mail Transfer Protocol (SMTP). |
utl_mail | Provides the capability to manage email. |
utl_url | Provides a way to escape illegal and reserved characters in a URL. |
utl_raw | Provides 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.
If you initialize the database using --no-redwood-compat
mode, the installation includes the following packages.
Package | Functionality noncompatible with Oracle databases |
---|---|
dbms_aqadm | Provides supporting procedures for Advanced Queueing functionality. |
dbms_aq | Provides message queueing and processing for EDB Postgres Advanced Server. |
edb_bulkload | Provides direct/conventional data loading capability when loading huge amount of data into a database. |
edb_gen | Provides miscellaneous packages to run built-in packages. |
edb_objects | Provides Oracle-compatible objects such as packages and procedures. |
waitstates | Provides monitor session blocking. |
edb_dblink_libpq | Provides link to foreign databases by way of libpq. |
edb_dblink_oci | Provides link to foreign databases by way of OCI. |
snap_tables | Creates tables to hold wait information. Included with DRITA scripts. |
snap_functions | Creates functions to return a list of snap ids and the time the snapshot was taken. Included with DRITA scripts. |
sys_stats | Provides 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:
Where path_to_initdb_installation_directory
specifies the location of the initdb
binary file.