For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

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 CONNECT on 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

Parameter
Required
Default
Description

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:

  • CONNECT on the target database.

  • USAGE and CREATE on the target schema (the latter only if Nilus is expected to auto-create tables).

  • INSERT, UPDATE, DELETE, SELECT on the target tables according to the configured incremental_strategy.

URI format

Sink options

Option
Required
Description

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: batch and cdc.

  • Identifier case: PostgreSQL folds unquoted identifiers to lower-case. Either keep dest_table lower-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

Symptom
Likely cause
Resolution

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.

Last updated

Was this helpful?