PostgreSQL
Configuration reference for the PostgreSQL destination: connectivity and grants, sink options, partitioned-table writes, and troubleshooting.
PostgreSQL is a mature, feature-rich open-source relational database. Nilus writes into PostgreSQL tables for both batch and CDC pipelines through the standard PostgreSQL SQL path.
Requirements
Connectivity and credentials must both be in place before the pipeline can run.
Connectivity
The Nilus runtime must reach the PostgreSQL host on the configured port (default
5432).The PostgreSQL user needs
CONNECTon the target database.For network-restricted environments (RDS, Cloud SQL, private endpoints), make sure the runtime egress IP is allowlisted on the database side.
Required parameters
host
Yes
-
PostgreSQL host name.
port
No
5432
PostgreSQL port.
database
Yes
-
Target database.
username
Yes
-
PostgreSQL user.
password
Yes
-
Password for the PostgreSQL user.
sslmode
No
server default
Optional SSL mode: disable, allow, prefer, require, verify-ca, verify-full.
Permissions
The configured user needs:
CONNECTon the target database.USAGEandCREATEon the target schema (the latter only if Nilus is expected to auto-create tables).INSERT,UPDATE,DELETE,SELECTon the target tables according to the configuredincremental_strategy.
URI format
Sink options
dest_table
Yes
Target table in <schema>.<table> form.
incremental_strategy
Yes
One of replace, append, or merge.
Sample Nilus configs
Each example below is self-contained and uses the current Nilus pipeline shape.
Batch ingestion
CDC ingestion
Behavior and capabilities
Compute model: Nilus writes through the PostgreSQL SQL endpoint as a normal client.
Object model: standard PostgreSQL tables addressed as
<schema>.<table>.Supported pipeline types:
batchandcdc.Identifier case: PostgreSQL folds unquoted identifiers to lower-case. Either keep
dest_tablelower-case, or quote identifiers in the destination DDL when you need mixed case.Partitioned target tables: Nilus can write into partitioned tables. See Working with partitioned tables for the recommended pattern.
Troubleshooting
password authentication failed for user …
Wrong credentials, user dropped, or the password rotated upstream.
Re-check the credentials and confirm the user still exists with the same password.
connection to server at "<host>", port <port> failed: timeout expired
Network path blocked (security group, firewall, private subnet).
Verify the runtime egress IP is allowlisted on the database side and the host/port are reachable.
SSL connection has been closed unexpectedly / SSL SYSCALL error
sslmode does not match what the server requires; common with managed PG that enforces require or higher.
Set sslmode=require (or verify-full with a CA bundle) in the URI.
dest_table rejected
Table name is missing the schema prefix.
Use the explicit <schema>.<table> form.
merge runs duplicate rows over time
The manifest does not declare a primary key for the dataset.
Add primary_key to the manifest's dataset spec.
Related docs
PostgreSQL: companion batch source connector.
PostgreSQL: companion CDC source connector.
PostgreSQL partitioned tables for CDC: setup for partitioned-table targets.
Optimize sink datasets: guidance on
incremental_strategyand dataset-shape tuning.
Last updated
Was this helpful?