Create a PostgreSQL DB Instance on AWS Relational Database Service (RDS)

Beginning in version 2019.3, you can host your External Repository on the AWS Cloud Platform. This topic describes how to create a AWS RDS PostgreSQL DB instance to use as your Tableau Server external repository.

To see a full list of hosts that you can use for the your external repository, see Tableau Server External Repository.

Requirements and Recommendations

  • At a minimum use db.m4.2xlarge Amazon RDS memory optimised instance type. This is the minimum recommended AWS RDS instance size to use for Tableau Server external repository, but the exact requirements will vary with your requirements and usage. We recommend db.r4.xlarge (or db.r5.xlarge) Amazon RDS memory optimised instance types for maximum performance.

    You can start with a smaller instance type and if you find later that you need a larger instance type, you can upgrade your existing RDS instance. For more information, see Upgrading your RDS Instance.

    Secure communication between Tableau Server and the external PostgreSQL DB instance using SSL connections is not required but recommended.

  • The PostgreSQL DB instance must be reachable by all nodes in the Tableau Server cluster. One of the ways you can do this is by making the PostgreSQL DB instance a member of a security group that has the necessary permissions to be accessed by all the nodes in the Tableau Server cluster.

  • The version of PosgreSQL should match the version used by Tableau Server when installed locally. Tableau Server 2020.4 uses PostgreSQL version 12.

Create a PostgreSQL DB instance on Amazon RDS

Step 1: Create a parameter group

PostgreSQL parameters that you set for a local PostgreSQL instance in the postgresql.conf file are maintained in the DB parameter group for your DB instance. When you create a DB instance, the parameters in the associated DB parameter group are loaded.

You can modify parameter values by changing values in the parameter group. You can also change parameter values, if you have the security privileges to do so, by using the ALTER DATABASE, ALTER ROLE and SET commands.

There are two types of PostgreSQL parameters, static and dynamic. Static parameters require that the DB instance be rebooted before they are applied. Dynamic parameters can be applied immediately.

The following table shows parameters that you should modify with Tableau recommended values:

Name Data type Parameter Type Recommended Tableau Configuration Values Description
autovacuum boolean Dynamic 1 Starts the autovacuum subprocess.
client_min_messages string Dynamic error Sets the message levels that are sent to the client.
escape_string_warning boolean Dynamic 0 Warns about backslash (\) escapes in ordinary string literals.
lc_messages string Dynamic en_US.UTF-8 Sets the language in which messages are displayed.
lc_monetary string Dynamic en_US.UTF-8 Sets the locale for formatting monetary amounts.
lc_numeric string Dynamic en_US.UTF-8 Sets the locale for formatting numbers.
lc_time string Dynamic en_US.UTF-8 Sets the locale for formatting date and time values.
log_autovacuum_min_duration integer Dynamic 100 Sets the minimum execution time above which autovacuum actions will be logged.
log_connections boolean Dynamic 1 Logs each successful connection.
log_lock_waits boolean Dynamic 1 Logs long lock waits.
log_min_duration_statement integer Dynamic 100 Sets the minimum execution time above which statements will be logged.
log_min_messages string Dynamic error Sets the message levels that are logged.
log_temp_files integer Dynamic 128 Logs the use of temporary files larger than this number of kilobytes.
rds.force_ssl boolean   1 Force SSL connections; requires import of certs on client keystore
rds.logical_replication boolean   1  
ssl boolean Static 1 Set to allow SSL connections
standard_conforming_strings boolean Dynamic 0 Causes ... strings to treat backslashes literally.
work_mem integer Dynamic 16384 Sets the maximum memory to be used for query workspaces.

For more information and a full list of PostgreSQL Parameters, see Working with PostgreSQL Parameters(Link opens in a new window) on the AWS site.

Step 2: Create a PostgreSQL DB instance on Amazon RDS

To create a new PostgreSQL DB instance, follow the instructions provided on the Amazon documentation site(Link opens in a new window).

Following are configuration options and the recommended values for the new PostgreSQL DB instance:

  • Instance Specifications

    • Use the parameter group created in Step 1.
    • Use the compatible version of PostgreSQL for the version of Tableau Server you are using. For a full list of PostgreSQL versions compatible with Tableau Server versions, see Product Compatibility.
    • Use DB instance class that is db.m4.2xlarge or larger.
    • Allocate at least 100 GB of storage.
    • Storage type and Provisioned IOPS: leave default (recommendations may change depending on load testing).
  • Settings

    • You must use rails as the master username.

      This is a requirement for the external repository to work properly with Tableau Server.

    • Pick a password that meets AWS's requirements.

  • Network and Security

    • Make sure that the RDS instance can be reached by all the Tableau Server nodes. This most often involves creating a security group that allows access from the nodes.

  • Database Options

    • Don't create an initial database. The Database name should be left blank, as Tableau Server will create the needed databases in the RDS instance.

    • The port can be anything, but we recommend leaving it as the default 5432.

    • Set the DB Parameter Group to the one created in Step 1.

    • Leave the IAM DB authentication as disabled.

  • Encryption

    • You can choose whether or not you want encryption.

  • Backup

    • This is for AWS's automated backups, not Tableau Server's backups. You can specify the settings that meets the requirements.

  • Monitoring

    • You can specify the settings based on your requirements.

  • Log Exports

    • You can specify the settings based on your requirements.

  • Maintenance

    • Disable auto minor version upgrade. Tableau Server is built to use a specific version of PostgreSQL, and you will be prompted to upgrade the PostgreSQL version if needed, during Tableau Server Upgrade.

  • Delete Protection

    • You can specify the settings based on your requirements.

Step 3: Get the PostgresSQL DB Instance Endpoint

After creating the PostgreSQL database instance, you can't use it until it's completed initialisation by AWS and this can take several minutes. Once the instance is ready, get the endpoint information that you will use to configure Tableau Server to use this instance for the Tableau Server Repository.

Step 4: Download the SSL certificate file (.pem file)

Secure connections between Tableau Server and the External Repository using SSL is not required, but recommended.

If you want to set up secure connections between Tableau Server and the External Repository, you will need the .pem file when you configure Tableau Server to use the external DB instance for your Tableau Server Repository. For more information, see Using SSL to Encrypt the Connection to a DB Instance(Link opens in a new window).

If you do not need to use secure connections between Tableau Server and External Repository, you need to configure the RDS instance to allow unencrypted connections.

Important: If as part of a planned expiration of the SSL certificate of the RDS instance, you need to update your RDS instance with the new certificate file, you also need to update Tableau Server settings to use the new certificate file. You can do this by downloading the latest file and running the tsm topology external-services repository replace-host command and providing the new certificate file.

Configuring High Availability for your PostgreSQL DB

Tableau Server does not manage or setup high availability for the external repository. Amazon RDS offers high availability features that can be used to provide high availability, manage failover, etc. For more information, see Amazon RDS High Availability(Link opens in a new window).

Disaster Recovery for your PostgreSQL DB

In the event of a disaster, you may need to setup a new RDS instance. There are other scenarios where you may need to recover from an issue with the RDS instance. For example, when you upgrade your Tableau Server, you might also need to upgrade the PostgreSQL version on your RDS instance. In the event that your PostgreSQL upgrade is not successful you might have to use a new RDS instance. In such scenarios, to configure your Tableau Server to use the new RDS instance, use the following steps:

  1. Restore the snapshot to a new RDS instance. AWS does not support restoring a snapshot to an existing RDS instance. For more on RDS snapshot backup and restore, see Amazon RDS Backup and Restore.

  2. Create a new JSON settings file containing connection information for the new RDS instance. For more information on creating a JSON settings file, see Step 1 in Install Tableau Server with External PostgreSQL Repository.

  3. Use the tsm topology external-services repository replace-host command to point your Tableau Server to the new RDS instance.

    For more information on the tsm topology external-services repository replace-host command, see tsm topology.

Who can do this

Only Tableau Server Administrators can configure Tableau Server to use the external repository. You will also need an AWS account to create a RDS instance.

Thanks for your feedback!