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 an instance with 8vCPUs and 32GB RAM. 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 using 16 vCPUs and 128GB RAM Amazon RDS memory optimized instance types for good 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 PostgreSQL should match the version used by Tableau Server when installed locally. Tableau Server 2020.4 uses PostgreSQL version 12.
-
Tableau auto-generates passwords for internal use by internal database users. These passwords are 32 characters long and consist of lower-case letters and numbers. They cannot be accessed or configured by an admin. Your external PostgreSQL instance may allow you to set a password policy (this will depend on the platform you are using). If you specify a policy that includes character types other than numbers and lower-case letters, this can cause errors while configuring Tableau Server to use the external repository.
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.
From the Tableau Server perspective, most of the parameters can be set to defaults. You can modify the parameter values if you have specific performance or logging requirements, but we strongly recommend that the following parameters be left to default values and not be changed:
-
standard_conforming_strings
-
escape_string_warning
We also recommend the value for the work_mem
be set to at least 16384 to help avoid performance issues.
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 100GB 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 initialization 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:
-
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.
-
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.
-
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.
Next Steps
For new installs: Install Tableau Server with External PostgreSQL Repository
If you want to configure your existing Tableau Server to use an external repository, see Re-Configure Tableau Server Repository.