> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tablepro.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon Redshift

> Connect to Redshift clusters and Serverless over the PostgreSQL wire protocol, with DISTKEY and SORTKEY metadata display

Redshift speaks the PostgreSQL wire protocol and uses the same bundled libpq driver, so the [PostgreSQL](https://docs.tablepro.app/databases/postgresql.md) page covers the form and the URL. This page covers where a columnar warehouse differs: distribution style and sort keys in table info, external schemas, and a read-only structure tab.

## Connection settings

| Field | Default | Notes |
| - | - | - |
| **Host** | - | The cluster endpoint, `my-cluster.abc123xyz.us-east-1.redshift.amazonaws.com` in shape, or the workgroup endpoint on Serverless |
| **Port** | `5439` | Same for a provisioned cluster and for Serverless |
| **Database** | `dev` | **Required**; every cluster is created with a `dev` database |

Fill in the form and click **Save & Connect**. New connections default to SSL mode **Preferred**, and there is no version gate: any cluster AWS still runs will connect.

For a cluster that is not publicly reachable, put it behind an [SSH tunnel](https://docs.tablepro.app/connections/ssh-tunneling.md) on a bastion in the VPC.

## AWS IAM sign-in

Set **Method** under **Authentication** to **AWS IAM (Profile)**, **AWS IAM (SSO)** or **AWS IAM (Access Key)**, and every connect asks AWS for a user and a temporary password instead of reading a saved one. Profiles resolve as described in [AWS IAM Authentication](https://docs.tablepro.app/connections/aws-iam.md#profiles), IAM Identity Center sign-in included.

| Endpoint | AWS call | Signs in as |
| - | - | - |
| Provisioned cluster, **Username** empty | `redshift:GetClusterCredentialsWithIAM` | The user mapped to your IAM identity, such as `IAMR:analyst` |
| Provisioned cluster, **Username** set | `redshift:GetClusterCredentials` for that user | `IAM:` and the user name |
| Serverless workgroup | `redshift-serverless:GetCredentials` | The user mapped to your IAM identity |

The cluster or workgroup and its region come from **Host**. A tunnel TablePro opens needs nothing more. A port forward you run yourself leaves `127.0.0.1` in **Host**: set **Redshift Endpoint** to the real one, such as `my-cluster.abc123xyz.us-east-1.redshift.amazonaws.com`. It is honored only when **Host** is a loopback address, a custom domain name, or that same endpoint. **AWS Region** overrides the region.

A [custom domain name](https://docs.aws.amazon.com/redshift/latest/mgmt/connecting-connection-CNAME.html) set up for the cluster or workgroup works as **Host**. The connect follows its CNAME to tell a cluster from a workgroup and to find the region, then asks AWS for credentials by the custom domain name, which AWS answers only for a domain associated in your account. When this Mac's DNS cannot follow the CNAME, **Redshift Endpoint** gives the cluster or workgroup endpoint instead. For a provisioned cluster, AWS also asks for `redshift:DescribeCustomDomainAssociations`.

The policy needs the call above on the cluster or workgroup, and access to the `dbname` when it limits databases. The password lasts 15 minutes and is fetched again for each connect, and SSL mode **Disabled** or **Preferred** is raised to **Required**. IAM sign-in to Redshift works on the Mac only.

## Connection URL

```text theme={null}
redshift://user:password@my-cluster.abc123xyz.us-east-1.redshift.amazonaws.com:5439/dev
```

See [Connection URL Reference](https://docs.tablepro.app/connections/urls.md).

## Schemas and metadata

The default schema is `public`, and table metadata comes from `svv_table_info`: distribution style, sort keys, and table size. `dev` is listed like any other database; only `padb_harvest` is marked as a system database. A tab bound to a database other than the connection's active one opens a second connection for it, exactly as on [PostgreSQL](https://docs.tablepro.app/databases/postgresql.md#cross-database-tabs).

Table DDL includes DISTKEY, SORTKEY, DISTSTYLE, and ENCODE directives. Foreign keys are shown but not enforced by the server.

![Redshift table info showing distribution style and sort keys](https://mintcdn.com/ngquct/sezpSJY0oLylJ5LP/images/redshift-table-info-sortkeys.png?fit=max\&auto=format\&n=sezpSJY0oLylJ5LP\&q=85\&s=3dd5a6b9af12cb7ee996eecf01a6b804)

Distribution style and sort keys in table info

## External schemas

Schemas created with `CREATE EXTERNAL SCHEMA` are listed beside regular ones and marked **External**, with an external icon on their tables. Spectrum over S3, federated query, cross-database references, and datashare consumers all land here.

Their tables are read-only: Redshift takes no `UPDATE` or `DELETE` on them and they carry no primary key, so cell editing, adding rows, and deleting rows are off. Browsing, filtering, sorting, and export work as usual.

## Backup

**Backup Dump** and **Restore Dump** run `pg_dump` and `pg_restore` against Redshift, the only engine besides PostgreSQL where they are offered. See [Backup & Restore](https://docs.tablepro.app/features/backup-restore.md).

## Limitations

* No structure editing. The structure tab is read-only for Redshift; run `ALTER TABLE` in the SQL editor.
* No indexes, enums, sequences, or triggers. DISTKEY and SORTKEY do the work indexes would.
* Foreign keys are informational only. Nothing stops a row that violates one; validate in the load job.
* No Maintenance menu. Run `VACUUM` and `ANALYZE` from the SQL editor.
* External tables show no row count, and their column types come through as the external catalog reports them, such as `varchar(65535)` or `array<varchar(20)>`.

## Troubleshooting

**Connection refused**: check the security group allows port 5439, the cluster is publicly accessible or reachable through a tunnel, and it is not paused.

**FATAL: password authentication failed for user "…"**: the cluster rejected the credentials. Verify the master username and password in the AWS Console, and that the user exists in this database.

**Slow queries**: check distribution with `SELECT * FROM svv_table_info WHERE "table" = 'your_table'`, run `ANALYZE` to refresh stats, and match SORTKEY to the predicates you filter and join on.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.