Docs/Streams/Database Guides/PostgreSQL

PostgreSQL Target Configuration

Use this page when PostgreSQL is the target for a DBConvert Streams workflow.

PostgreSQL targets receive data from both Load and CDC streams. The source can be MySQL, PostgreSQL, local files, or S3-compatible storage.

Target privileges

The target user needs write access to the target database and schema. The exact privileges depend on the stream configuration:

PrivilegeWhen needed
INSERT on tablesAlways — all streams write rows
CREATE on schemaWhen structure options allow table/index creation
USAGE on schemaAlways — required to access schema objects
TRUNCATE on tablesWhen writeMode is truncate_and_load

Example grants for a target user that can create and write:

GRANT USAGE, CREATE ON SCHEMA public TO target_user;
GRANT INSERT, UPDATE, TRUNCATE ON ALL TABLES IN SCHEMA public TO target_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT INSERT, UPDATE, TRUNCATE ON TABLES TO target_user;

For drop_and_recreate schema policy, the user also needs ownership of the tables or superuser access, since PostgreSQL uses DROP TABLE ... CASCADE.

For connection and network setup, see PostgreSQL Server Configuration. To verify visible schemas and tables, open the connection in Data Explorer.

Target behavior

Two settings control what the stream does with existing target tables and data:

SettingWhat it controlsDefault (Load)Default (CDC)
schemaPolicyWhat to do if target tables already existfail_if_existsvalidate_existing
writeModeWhat to do if target tables contain rowsfail_if_not_emptyupsert

CDC mode supports upsert (default, recommended) and append. Use append for insert-only workloads where you want maximum write throughput. See Target Schema and Data Policies for all values and decision guidance.

Structure creation

By default, the stream creates missing tables, indexes, foreign keys, and check constraints on the target. Disable any of these with structure options.

When the source is MySQL, data types are converted automatically. See Table Structure Conversion for the full mapping.

Validation checklist

  1. Test the target connection from the Data Explorer sidebar (right-click → Test connection) or from the connection editor.
  2. Open the target database in Data Explorer and confirm the expected database and schemas are reachable.
  3. Verify the target user has the required privileges for your chosen schema policy and write mode.
  4. Run a small validation stream (one or two tables) before scaling up.