Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

This page is currently invisible to customers through Restrictions

Platform Support

Datical DB supports these Postgres platforms and variants:

...

See Hardware, Software, and Database Requirements for more information on version support. 

Prerequisite: Ownership of Schema and Database Objects

In order for Datical DB to manage an existing Postgres instance, it must connect as a user with at least one of the following requirements:

...

Warning
titleSpecial Instructions for Postgres in Amazon RDS

If you are using Postgres for Amazon RDS or for Aurora, the admin user they provide is NOT a true superuser and its privileges are NOT sufficient to perform Datical DB operations. The user specified in the DbDef connection must  have proper permissions on the database (connect, create, and temporary are suggested) as well as ownership of schema and objects as described above. See AWS documentation for more information.


Expand
titleInstructions for Reassigning Object Ownership in Postgres for Amazon RDS

The following steps to reassign object ownership without superuser privileges can be taken in Postgres in Amazon RDS environments

1. Create a new role named 'change_owner' and grant it the LOGIN privilege

Code Block
mydb=> CREATE ROLE change_owner LOGIN;
CREATE ROLE

2. Make both the current owner ('old_owner') and the new Datical owner ('new_ddb_owner') roles members of the newly created role
Code Block
mydb=> GRANT old_owner TO change_owner; 
GRANT ROLE 
mydb=> GRANT new_ddb_owner TO change_owner; 
GRANT ROLE


3. Logout from psql and login using the new role

Code Block
$ psql -U change_owner mydb
mydb=>


4. Execute the reassignment

Code Block
mydb=> REASSIGN OWNED BY old_owner TO new_ddb_owner 
REASSIGN OWNED


Courtesy of sysadmintips.com


Pipeline Steps in the Project

Each database in your release pipeline is represented as a step in the Datical DB project. Each step has its own set of connection information, including the user to connect as (the connection user).

...

Info
titleNote

You do not have to use the same user for every step in the pipeline, as long as that user has the requisite ownership to perform Datical DB operations.

Choosing a User to Manage PostgreSQL Databases

If you already have a user with the requisite ownership, you can configure Datical DB to connect as that user and skip the following steps.

Creating a User to Manage PostgreSQL Databases

If you want to create a new user to be the Datical DB connection user, then you have two options:

...

The following sections show how to create a user, grant the required permissions, and transfer ownership of database objects. 

1. Creating the Datical User and Granting the Required Permissions

Log in as a superuser and run the following commands, substituting user and database name appropriately.

Code Block
languagesql
CREATE USER "datical_user" WITH PASSWORD 'password';
GRANT CREATE, CONNECT, TEMPORARY ON DATABASE "your_database_name" TO "datical_user" WITH GRANT OPTION;

Note: It is important to add @<server-name> after the user name for the Azure Postgres connection in DbDef like so:

Code Block
languagesql
CREATE USER "datical_user@<server_name>" WITH PASSWORD 'password';
GRANT CREATE, CONNECT, TEMPORARY ON DATABASE "your_database_name" TO "datical_user" WITH GRANT OPTION;

2. Transferring Ownership of Database Objects to the Datical User

You must either log in as a superuser or the object owner to transfer ownership.

...

  1. Make the current owner a member of the Datical user role.
    • Log in as a superuser or the Datical user and grant membership:

      Code Block
      languagesql
      GRANT "datical_user" to "current_owner";


  2. Transfer ownership of database objects.
    • To transfer ownership of a schema:

      Code Block
      languagesql
      ALTER SCHEMA "schema_name" OWNER TO "datical_user";


    • To transfer ALL objects on a database to another user:

      Code Block
      languagesql
      REASSIGN OWNED BY "current_owner" TO "datical_user";



    • To transfer a single object on a database to another user, please refer to the appropriate ALTER statement for that object type in the Postgres documentation.

Limitations

Function Type Support On Cloud Environments

This is general information about Amazon support for these functions. The user with the highest level of permissions on Aurora/RDS (rds_superuser) does not have the capability to create certain functions. This is the case whether you are using Datical or not!

...