PostgreSQL

Flowgen connects to PostgreSQL for query execution, bulk writes and change data capture.

  • Query — runs SQL statements and returns results as Arrow RecordBatch.
  • Write — appends, upserts or deletes rows with COPY.
  • CDC — emits each row change of the tables in a publication.

Credentials

The credentials_path field points to a JSON file with the connection details:

{
  "host": "postgres.example.com",
  "port": 5432,
  "database": "mydb",
  "username": "user",
  "password": "pass",
  "ssl_mode": "require"
}
FieldTypeDefaultDescription
hoststringrequiredServer hostname.
portnumber5432Server port.
databasestringrequiredDatabase name.
usernamestringrequiredUsername.
passwordstringrequiredPassword.
ssl_modestringpreferdisable, prefer (TLS when the server offers it, plain when it doesn’t) or require.
ca_certificate_pathstringPEM file with the CA that signs the server certificate. System roots when unset.

With TLS, the server certificate is always verified, also with prefer: a self-signed certificate needs ca_certificate_path.