Creating a PostgreSQL database and table space for the Content Platform Engine GCD

Create a database and table space for the Content Platform Engine global configuration database on PostgreSQL.

Before you begin

  • Do not share the database used for the GCD with object stores or IBM® Content Navigator configuration data.
  • The database name needs to be unique. The table space name must be at most 18 characters long.
  • Set max_prepared_transactions to a value that accommodates your workload. PostgreSQL recommends that max_prepared_transactions to be at least as large as max_connections so that every session can have a prepared transaction pending. To estimate the number of database connections that might be concurrently active within a IBM FileNet® P8 domain, see topic Tuning a PostgreSQL database for Content Platform Engine.
  • Encoding (Character set) required - UTF8.
  • Locale settings (Collation) must include support for UTF8.
  • FileNet Content Manager recommends usage of a dedicated table space for each database for better performance and easier administration.

Procedure

Create the table space for the GCD.
The following table shows the recommended minimum size for the table space for the GCD.
Content Platform Engine table space Minimum Size (MB)
GCD_ts 256

For example, the following sample set of psql commands might be used to create a database for the GCD. 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 initdb was run.

Tip: PostgreSQL is case sensitive and only accepts identifiers as lowercase.
Tip: To create a database, you must be a superuser or have the special CREATEDB privilege.
-- create user <username>
CREATE ROLE <username> WITH INHERIT LOGIN ENCRYPTED PASSWORD '<your_password>';
-- please modify location follow your requirement
create tablespace gcddb_tbs owner <username> location '/pgsqldata/gcddb';
grant create on tablespace gcddb_tbs to <username>;
-- create database gcddb
create database gcddb owner <username> tablespace gcddb_tbs template template0 encoding UTF8 ;
revoke connect on database gcddb from public;
grant all privileges on database gcddb to <username>;
grant connect, temp, create on database gcddb to <username>;
-- create a schema for gcddb and set the default
-- connect to the respective database before executing the below commands
\connect gcddb;
CREATE SCHEMA IF NOT EXISTS AUTHORIZATION <username>;
GRANT USAGE, CREATE ON SCHEMA <username> TO <username>; 
SET ROLE <username>;
ALTER DATABASE gcddb SET search_path TO <username>;