Introduction
This document provides an overview of the OCI PostgreSQL administrator user, including its roles, attributes, and privileges available to customers. The administrator user is created during OCI Database with PostgreSQL DB System provisioning and serves as the primary customer administrator for managing databases and database-level resources.
The administrator account represents the highest level of database privileges available to customers for managing their DB System within the OCI PostgreSQL managed service.
The administrator account provides the privileges needed to perform common database administration tasks, including managing customer databases, users, roles, permissions, and database objects. Because OCI Database with PostgreSQL is a fully managed service, this administrator is not a PostgreSQL superuser; service-level privileges required to operate and maintain the DB system remain managed by OCI.
This article provides an overview of the administrator account, including its default role attributes and role memberships, and explains the distinction between customer-managed and OCI-managed roles.
divider
Customer Administrator User Creation
The administrator username and password are provided when the new Postgres DBsystem is provision. After provisioning, customers use this account to connect to PostgreSQL and perform database administration tasks.
Typical activities include:
- Creating and managing databases
- Creating database users and roles
- Managing schemas and database objects
- Granting privileges to customer users
- Monitoring database activity
- Managing access for applications and operational users
The administrator is therefore the starting point for managing customer access to the PostgreSQL environment.
Important: The administrator is a privileged customer account, but it is not the PostgreSQL superuser.
Default Administrator user Attributes
OCI creates the administrator with a set of PostgreSQL role attributes appropriate for customer database administration.
LOGIN | Enabled | The administrator can connect to PostgreSQL. |
SUPERUSER | Disabled | The administrator does not have unrestricted PostgreSQL superuser privileges. |
CREATEDB | Enabled | The administrator can create customer databases. |
CREATEROLE | Enabled | The administrator can create and manage eligible customer users and roles. |
INHERIT | Enabled | The administrator can inherit privileges from roles assigned to it. |
REPLICATION | Enabled | The customer administrator can configure and manage logical replication |
VALID UNTIL | infinity | The PostgreSQL role does not have a default password expiration date. |
For most customers, the important attributes are CREATEDB and CREATEROLE These allow the administrator to create databases and establish the users and role structure required by customer applications.
At the same time, SUPERUSER is disabled. This creates a clear boundary between customer database administration and OCI management of the underlying service.
Understanding OCI-Managed Roles
Customers inspecting PostgreSQL roles may notice roles whose names begin with oci_*
These roles are created and managed by OCI to support the operation of the managed PostgreSQL service. They can be used for service functions such as administration, monitoring, metrics, replication, and other managed internal operations.
These roles should be considered service-managed roles, rather than normal customer application accounts.
Customers should generally avoid:
- Using OCI-managed accounts for application connections
- Modifying OCI-managed roles
- Changing their role attributes
- Building application access models around OCI service roles
Default Role Memberships
The customer administrator receives additional administrative privileges through membership in the oci_admin_role, which provides predefined permissions managed by the OCI PostgreSQL service.
What about oci_admin_role?
oci_admin_role is an important customer-facing role among the OCI-managed roles. OCI creates and manages this role and grants it to the customer administrator during DB system provisioning to provide the additional PostgreSQL privileges required for supported database administration tasks.
The oci_admin_role itself is a NOLOGIN role, so customers cannot connect to the database directly using this role. Instead, customers continue to connect using the administrator username and password specified during DB system creation. The customer administrator is a member of oci_admin_role by default and inherits the privileges available through this role, while remaining a non-superuser.
The oci_admin_role includes membership in several PostgreSQL predefined roles that provide data access, monitoring, operational, and subscription-management capabilities:

The predefined role memberships associated with oci_admin_role include:
pg_read_all_data | Provides read access to data across schemas and tables where supported by PostgreSQL. |
pg_write_all_data | Provides write access to data across schemas and tables where supported by PostgreSQL. |
pg_monitor | Provides access to PostgreSQL monitoring and diagnostic information. |
pg_read_all_settings | Allows reading PostgreSQL configuration settings. |
pg_read_all_stats | Provides access to PostgreSQL statistics information. |
pg_stat_scan_tables | Allows execution of monitoring functions that may require locks on tables. |
pg_signal_backend | Allows signaling other PostgreSQL backend processes, subject to PostgreSQL restrictions. |
pg_create_subscription | Provides privileges related to creating PostgreSQL logical replication subscriptions. |
From a customer administrator perspective, the relationship can be viewed as:

This model allows the customer administrator to perform supported PostgreSQL administration tasks without providing unrestricted PostgreSQL superuser access.
Creating Customer Users and Roles
The provisioned administrator user can create additional users and roles for customer workloads because it has the CREATEROLE attribute.
Customers should use this capability to separate administrative access from application access.
For example, a production environment might have:
- A database administrator account
- An application read/write role
- An application read-only role
- A reporting user
- An operations or monitoring user
- Individual application login accounts
A simple access model might look like this:

This approach makes privileges easier to understand and manage.
Customer-Managed Roles vs. OCI-Managed Roles
A useful way to understand roles in an OCI PostgreSQL DB system is to divide them into two groups.
Customer-Managed Roles
Customer-managed roles are created by customer databases and workloads.
Examples include:
app_read_only
app_read_write
reporting_user
application_user
database_operator
Customers control how these roles are used and which database privileges they receive.
OCI-Managed Roles
OCI-managed roles support operation of the managed database service. Customers may see these roles when inspecting PostgreSQL role information, but they should not use them for application support or other customer-managed purposes. OCI-managed role names begin with oci_*
The key distinction is:
| Created for customer workloads | Created for managed-service operations |
| Used by applications and customer users | Used by OCI service functionality |
| Managed by the customer | Managed by OCI |
| Privileges are based on application requirements | Privileges are based on service requirements |
This separation is an important part of the security model of OCI Database with PostgreSQL.
Why Isn’t the Administrator user a PostgreSQL Superuser?
In a self-managed PostgreSQL installation, the database owner controls the PostgreSQL superuser and the underlying infrastructure.
OCI Database with PostgreSQL operates differently because OCI manages the database service on behalf of the customer
OCI is responsible for service operations such as:
- Availability and service operation
- Monitoring
- Maintenance
- Backup and recovery
- Replication
- Infrastructure management
For these reasons, service-level privileges remain under OCI control.
The customer administrator receives the privileges required to manage customer databases ,schema and workloads without receiving unrestricted access to the service-managed environment.
This provides customers with strong database administration capabilities while preserving the operational boundary required by a managed database service.
Recommended Approach for Application Access
The provisioned administrator should primarily be used for Customer database administration, rather than as an application account.
An application typically does not need the ability to create databases or manage other users. Using the administrator account for application connections therefore provides more privileges than the application requires.
A better approach is to:
- Use the provisioned administrator for database administration.
- Create dedicated roles for application privileges.
- Create separate login accounts for applications and users.
- Grant each account only the access required for its workload.
- Keep OCI-managed roles separate from the customer application access model.
For example:

This model follows the principle of least privilege and reduces unnecessary use of highly privileged accounts.
What Customers Should Remember
When working with the administrator account in OCI Database with PostgreSQL, keep these key points in mind:
The administrator is not a PostgreSQL superuser.
It has broad customer administration privileges, while service-level privileges remain managed by OCI.
The administrator can create databases and customer roles.CREATEDB and CREATEROLE provide the capabilities needed to establish customer databases, users, and access models.
The administrator receives predefined role memberships.oci_admin_role provides OCI-approved administrative capabilities, while pg_read_all_stats provides access to PostgreSQL statistics required for monitoring and troubleshooting.
OCI-managed roles are different from customer roles.
Roles used by OCI to operate the managed service should not be used as application accounts or modified as part of the customer’s normal role-management model.
Applications should use dedicated accounts.
Create application-specific roles and users with only the permissions required by each workload rather than connecting applications with the administrator account.
Conclusion
The administrator created when provisioning an OCI Database with PostgreSQL DB system is the primary account for managing customer databases and access.
It provides capabilities such as database creation, role management, and database administration, while intentionally remaining a non-superuser account.
The administrator also receives important predefined role memberships, including oci_admin_role for OCI-approved administrative capabilities and pg_read_all_stats for PostgreSQL monitoring and statistics access.
The overall security model is straightforward:
Customers manage their databases, users, roles, and application privileges, while OCI manages the service-level roles and privileges required to operate the PostgreSQL service.
Understanding this separation helps customers build a secure and maintainable access model while taking advantage of the managed capabilities provided by OCI Database with PostgreSQL.
