Amazon Redshift
Amazon Redshift uses the PostgreSQL wire protocol, so SoftDB connects to it using the same pgx driver as PostgreSQL. You get multi-database browsing, EXPLAIN support, and a structure designer — with some limitations specific to Redshift’s columnar architecture.
Quick Setup
Section titled “Quick Setup”-
Open the Connection Hub and click New Connection.
-
Select Redshift as the database type.
-
Fill in your connection details:
- Host: your Redshift cluster endpoint (e.g.,
my-cluster.abc123.us-east-1.redshift.amazonaws.com) - Port:
5439 - Username: your Redshift user (e.g.,
awsuser) - Password: your password
- Database: your database name (defaults to
devif left blank)
- Host: your Redshift cluster endpoint (e.g.,
-
Set SSL Mode to
require(Redshift requires SSL by default). -
Click Test Connection, then Save.
Connection Settings
Section titled “Connection Settings”| Field | Default | Notes |
|---|---|---|
| Host | — | Redshift cluster endpoint hostname |
| Port | 5439 | Standard Redshift port (not 5432) |
| Username | — | Required |
| Password | — | Stored encrypted |
| Database | dev | Defaults to dev if left blank |
| SSL Mode | require | Redshift requires SSL; use require or verify-full |
Multi-Database Browsing
Section titled “Multi-Database Browsing”SoftDB queries pg_database to list all non-template databases on the cluster. The sidebar shows a three-level tree similar to PostgreSQL. Switching databases requires a full reconnect (same as PostgreSQL), which SoftDB handles automatically when you click a different database in the tree.
Structure Designer
Section titled “Structure Designer”Redshift’s DDL support is narrower than PostgreSQL’s. The structure designer reflects these limitations:
| Operation | Supported | Notes |
|---|---|---|
| Create table | Yes | |
| Add column | Yes | |
| Rename column | Yes | |
| Change column type | Yes | Limited to specific conversions; may fail on existing data |
| Change column default | No | Not supported by Redshift ALTER TABLE |
| Change column nullability | No | Not supported by Redshift ALTER TABLE |
| Drop column | Yes | Destructive, requires confirmation |
SQL Examples
Section titled “SQL Examples”DISTKEY and SORTKEY
Section titled “DISTKEY and SORTKEY”-- Create a table with distribution and sort keysCREATE TABLE orders ( order_id BIGINT NOT NULL, customer_id BIGINT NOT NULL, order_date DATE NOT NULL, amount DECIMAL(10, 2))DISTKEY(customer_id)SORTKEY(order_date);COPY from S3
Section titled “COPY from S3”-- Load data from S3 into a Redshift tableCOPY ordersFROM 's3://my-bucket/data/orders/'IAM_ROLE 'arn:aws:iam::123456789:role/RedshiftS3Role'FORMAT AS PARQUET;Analytical queries
Section titled “Analytical queries”-- Revenue by month with running totalSELECT DATE_TRUNC('month', order_date) AS month, SUM(amount) AS monthly_revenue, SUM(SUM(amount)) OVER (ORDER BY DATE_TRUNC('month', order_date)) AS cumulative_revenueFROM ordersGROUP BY 1ORDER BY 1;EXPLAIN
Section titled “EXPLAIN”EXPLAINSELECT customer_id, SUM(amount)FROM ordersWHERE order_date >= '2024-01-01'GROUP BY customer_id;SoftDB renders the EXPLAIN output in the results grid. Redshift’s EXPLAIN output shows the query plan with estimated costs and distribution information.
Check table distribution
Section titled “Check table distribution”-- Check how data is distributed across slicesSELECT trim(name) AS table_name, diststyle, distkeyFROM pg_class_infoWHERE schema = 'public'ORDER BY name;Limitations
Section titled “Limitations”Compared to PostgreSQL, Redshift has these notable limitations in SoftDB:
- No stored functions — Redshift has limited stored procedure support; the Functions section in the sidebar is empty.
- No ALTER COLUMN default — you can’t change a column’s default value via the structure designer.
- No ALTER COLUMN nullability — you can’t change whether a column is nullable via the structure designer.
- Limited type conversions — only specific type changes are allowed (e.g., VARCHAR to a larger VARCHAR).
Troubleshooting
Section titled “Troubleshooting”Connection timeout
Section titled “Connection timeout”failed to ping redshift: dial tcp ...:5439: i/o timeoutThe most common cause is a VPC security group or firewall blocking port 5439. Check that:
- Your Redshift cluster’s security group allows inbound TCP on port 5439 from your IP.
- The cluster is in a public subnet (or you’re connecting via a VPN/bastion).
- The cluster endpoint is correct (copy it from the Redshift console).
Authentication failed
Section titled “Authentication failed”failed to ping redshift: FATAL: password authentication failed for user "awsuser"Wrong username or password. Redshift usernames are case-insensitive but passwords are case-sensitive. If you’re using IAM authentication, that’s not supported in SoftDB’s connection form — use a database user with a password instead.