Installing PostgreSQL and creating databases
You can install and configure PostgreSQL software and create one or more instances for your environment.
Procedure
To install PostgreSQL and create database instances:
- Install the PostgreSQL software. Many vendors and software as a service offerings are available sources of a PostgreSQL instance. You can also download and install PostgreSQL at https://www.postgresql.org/download/
. The Content Cortex qualifies its services using the PostgreSQL from that download. - Login as superuser or check for special CREATEDB privilege to create database in the next step.
- Create a database to use with an object store by using the sample set of
psqlcommands:The required encoding of UTF8 is included but the locale settings are omitted. For the locale settings, the default values for these categories used are those determined when
initdbwas run.Tip: PostgreSQL is case sensitive and only accepts identifiers as lowercase.If the ce_db_user is not the database owner, the required privileges for the database must be granted as shown in this example:GRANT CONNECT, SELECT, INSERT, UPDATE, CREATE, TEMPORARY, EXECUTE, USAGE ON DATABASE os1db TO ceuser;When creating the databases for your Content Cortex domain, it is recommended to create a database using template0 to ensure if contains only the standard objects predefined by your version of PostgreSQL. This approach is useful if you wish to avoid copying any installation-local objects that might have been added to template1. In particular, template0 should be used to allow the required encoding and locale settings. For example a statement of this form if the default locale is sufficient:CREATE DATABASE <database name> OWNER ce_db_user TEMPLATE template0 ENCODING UTF8;CREATE DATABASE os1db OWNER ceuser TEMPLATE template0 ENCODING UTF8; REVOKE CONNECT ON DATABASE os1db FROM public;