Supported PostgreSQL Version: PostgreSQL version 9.4 or higher.
Database Admin Access: Sufficient privileges to create users, grant permissions, and modify database configuration parameters. This might require superuser privileges or specific cloud provider roles (e.g., rds_superuser on AWS RDS, azure_pg_admin on Azure).
Network Connectivity: Ensure that Supermetal's services can reach your PostgreSQL database. You may need to configure firewall rules, security groups, or VPC peering.
Supermetal supports fast failover for clustered PostgreSQL databases (e.g., AWS Aurora, RDS Multi-AZ).
Use Cluster Endpoints: Use the Cluster Writer Endpoint (e.g., my-cluster.cluster-xyz.us-east-1.rds.amazonaws.com) rather than instance addresses.
Automatic Recovery: During logical replication, Supermetal detects failovers and resumes streaming from the new primary (typically < 10 seconds).
Transient connection errors (network timeouts, server restarts, failovers) are retried with backoff for up to 5 minutes (configurable via retry_window_seconds).
Uses PostgreSQL precision (p) and scale (s) directly to ensure exact numeric representation.
NUMERIC (unconstrained)
Utf8
Unconstrained NUMERIC defaults to Utf8 as precision/scale are undefined.
OID
UInt32
Object Identifier.
PG_LSN
UInt64
PostgreSQL Log Sequence Number.
PostgreSQL Type(s)
Apache Arrow DataType
Notes
DATE
Date32
Days since UNIX epoch. Precision preserved at the day level.
TIME
Time64(µs)
Microseconds since midnight. Precision preserved at the microsecond level.
TIMESTAMP
Timestamp(µs)
Microseconds since UNIX epoch, timezone naive. Precision preserved at microsecond level.
TIMESTAMPTZ
Timestamp(µs, "UTC")
Microseconds since UNIX epoch, assumed UTC. Precision preserved at microsecond level.
TIMETZ, INTERVAL
Utf8
Temporal types with string representation in Arrow.
PostgreSQL Type(s)
Apache Arrow DataType
Notes
CHAR, VARCHAR, TEXT, BPCHAR, NAME, UNKNOWN
Utf8
General-purpose text types.
citext, ltree, lquery, ltxtquery
Utf8
Special text types (checked by name in code).
BIT, VARBIT
Utf8
Bit string types represented as text.
UUID
Utf8
Universally Unique Identifier.
ENUM
Utf8
Enumerated types represented as their text labels.
INET, CIDR, MACADDR, MACADDR8
Utf8
Network address types.
TSVECTOR
Utf8
Text search vector type represented as text. Positions are not preserved
PostgreSQL Type(s)
Apache Arrow DataType
Notes
BYTEA
Binary
Variable-length byte array.
PostgreSQL Type(s)
Apache Arrow DataType
Notes
JSON, JSONB
Utf8
Mapped to Utf8. Using the Canonical JSON Extension (arrow.json) is recommended for interoperability, allowing downstream systems to recognize the content as JSON. This metadata signals to downstream supermetal targets (like Snowflake, Clickhouse, etc.) that the string contains JSON, allowing them to map it to their appropriate semi-structured types (e.g., VARIANT, JSON).
XML
Utf8
Mapped to Utf8. A canonical extension type for XML might also exist or be defined depending on specific library support, similar to JSON.
PostgreSQL Type(s)
Apache Arrow DataType
Notes
BOOL[]
List<Boolean>
Base types map as per their categories.
BYTEA[]
List<Binary>
INT2[]
List<Int16>
INT4[]
List<Int32>
INT8[], MONEY[]
List<Int64>
OID[]
List<UInt32>
PG_LSN[]
List<UInt64>
FLOAT4[]
List<Float32>
FLOAT8[]
List<Float64>
NUMERIC(p, s)[]
List<Decimal(p,s)>
Precision and scale preserved within list elements.
Domains are resolved to their underlying base type.
Composite Types (ROW)
Utf8
Composite types (structs/rows) are not explicitly mapped and default to a string (e.g., JSON) representation (Utf8).
PostgreSQL Type(s)
Apache Arrow DataType
Notes
POINT, LSEG, PATH, BOX, POLYGON, LINE, CIRCLE
Unsupported
Geometric types are unsupported.
PostgreSQL to PostgreSQL Replication
When replicating from PostgreSQL to PostgreSQL, Supermetal replicates the source PostgreSQL data types 1:1, preserving the exact type from source to target when possible.