Skip to content
Database · Two-way sync platform

PostgreSQL connector for two-way sync.

Keep PostgreSQL and your business systems aligned with Stacksync. Sync Tables within the connector’s object and field requirements, with two-way sync for eligible records.

  • Configure field mappings and sync direction
  • Inspect and resolve record errors in one dashboard

Adopted by fast-scaling companies moving mission-critical data in real time

Case study
Migrated from MuleSoft
Case study
Migrated from Celigo
Migrated from Heroku Connect
Migrated from Matillion
Case study
Migrated from Fivetran
Case study
Migrated from Celigo
Record types

PostgreSQL objects and coverage.

Start with the records your workflow needs. Object-specific permissions and operation limits are shown alongside the available coverage.

Tables
Check object and field eligibility in the setup guide.

Read the PostgreSQL object and setup guide

Connection setup

PostgreSQL connection requirements.

Check the account access and change-detection requirements for your environment. Your system administrator can help confirm permissions before the first sync.

Connection method
SQL wire protocol (PostgreSQL frontend/backend protocol)
Account access
Database credentials (connection string or parameters), with optional SSL root certificate upload and optional SSH tunnel (SSH user + host); a least-privilege DB user
How changes are detected
The Postgres connector uses logical replication. The separate Postgres Heroku connector uses database triggers when replication rights are unavailable.

Sync directions

  • Read data Documented
  • Write data Documented
PostgreSQLStacksync setup guide
Setup prerequisites for your administrator
  • Use a single-column primary key with a database-generated default for every selected table; composite primary keys are not supported.
  • Give the connected database role the required ownership and replication rights. Logical replication requires wallevel=logical; check the hosted database procedure before changing it.
  • For PostgreSQL 12 and earlier, have the database administrator install the pgcrypto extension before starting the sync so tracking tables can use genrandomuuid(). PostgreSQL 13 and later provide this function without the extension.

Documentation checked September 15, 2026.

Setup guides and technical references

Integration design

Match records and fields for your PostgreSQL integration.

Define the row/document key, external application identity, required types, and relationship model. Decide how nested values, nulls, schema changes, and deleted parents appear in the other system.

Use your account’s actual field names when applying these matching and dependency checks.

Explore record matching and field-mapping checks
PostgreSQLSource record IDKeep the account and record type
Record matchingSource ID ↔ destination IDLink the same record across systems
Selected destinationDestination record IDPreserve its local key and rules
Conceptual identity model. Keep source and destination IDs linked so an update reaches the right record. Confirm the supported sync direction separately.
Match the same record in both systems
Keep the database-generated local primary key separate from the external application record ID. Add a unique matching rule for the external ID, and test repeated delivery without creating a second business record.
Load related records in the right order
Load referenced rows before dependent foreign keys. Confirm the hosting-specific logical replication setup and track schema/table/column changes in the sync configuration.

Mapping checks by record type

Tables

Check the object requirements below

Identity
Define a stable key for each table row or document and retain the external application key separately. Confirm the selected connector’s exact key requirements before altering a schema.
Fields to consider
Local record key · External application ID · Required business fields · Parent record references
Related records to resolve first
Load referenced rows before dependent foreign keys. Confirm the hosting-specific logical replication setup and track schema/table/column changes in the sync configuration.
Test before going live
Test repeated delivery, a changed external value, a missing parent, an incompatible type, and a schema change using a representative record.

Download the field-mapping workbook (CSV) to capture the actual API fields, matching keys, owners, and test results. Use it as you build with your team or a Stacksync engineer.

Setup and validation

Validate the PostgreSQL integration in four steps.

Repeated delivery reaches one intended record; related data remains addressable and incompatible values produce an observable failure.

View the four setup tests and expected results
  1. Verify PostgreSQL connectivity and database privileges

    Use the documented setup from the integration network to the intended host, database, and schema. Have the administrator demonstrate the permissions required for both the first read and later change capture.

    Expected result: The approved role can access the selected data and capture later changes without depending on an administrator’s personal session.

  2. Verify generated keys and incremental capture

    Insert and update a test row using the approved database role. Confirm wallevel=logical and required replication rights; PostgreSQL 12 and earlier also need pgcrypto for the tracking-table UUID function.

    Expected result: The local key is generated, the external application identity remains distinct, and the later change is captured through the configured method.

  3. Test writes in the directions you need

    Select one eligible PostgreSQL object and writable field. Test the required create/update direction, an invalid value, and a repeated delivery. Check object-specific restrictions before enabling the return path.

    Expected result: The selected operation is confirmed, addresses the intended record, and exposes rejected values for repair.

  4. Test recovery and name the support owner

    Interrupt a non-production transfer, restore the connection, and reconcile the selected PostgreSQL records. When using Stacksync’s Retry to sync action, check the latest source value: the retry re-reads current source state rather than replaying an immutable historical event.

    Expected result: The records have the expected current values, repeated delivery creates no duplicate business record, and your team knows who handles unresolved errors.

Use the production-readiness checklist to record test results, assign support owners, and agree on when to go live.

Troubleshooting

Troubleshoot your PostgreSQL integration.

Diagnose record matching, delayed changes, and rejected operations
The table loads but later writes are missing
Verify logical replication and role permissions for this host. The separate Postgres Heroku connector uses triggers when replication rights are unavailable; confirm which connector is configured.
The first load looks correct but later results differ
The Postgres connector uses logical replication. The separate Postgres Heroku connector uses database triggers when replication rights are unavailable. Measure the original source change, its capture, and the destination observation separately. Confirm whether the affected object is incremental, historical-only, or subject to a special refresh cycle.
One operation succeeds while another is rejected
Check the specific PostgreSQL object, field permissions, required references, and allowed operation. A successful read does not establish that a create, update, deletion, or business action is available.

Review retry, replay, and recovery behavior before repeating an operation that may already have succeeded.

Review your PostgreSQL workflow with an engineer

FAQ

PostgreSQL connector FAQ

How should I plan an integration with PostgreSQL?

Generated keys, replication permissions, and hosting configuration determine the table setup. Stacksync supports two-way sync for eligible objects. Start with one workflow, agree on which fields each system owns, then test initial data, later changes, and recovery before expanding.

Can the PostgreSQL connector write changes back?

Stacksync supports reads and writes for eligible PostgreSQL objects. Check the selected fields, account permissions, and the other system’s connector. Insert and update a test row using the approved database role. Confirm wallevel=logical and required replication rights; PostgreSQL 12 and earlier also need pgcrypto for the tracking-table UUID function.

Which identifiers should I preserve for PostgreSQL data?

Keep the database-generated local primary key separate from the external application record ID. Add a unique matching rule for the external ID, and test repeated delivery without creating a second business record.

Which related records should I load first for PostgreSQL?

Load referenced rows before dependent foreign keys. Confirm the hosting-specific logical replication setup and track schema/table/column changes in the sync configuration.

What should I check if PostgreSQL data is missing or delayed?

Verify logical replication and role permissions for this host. The separate Postgres Heroku connector uses triggers when replication rights are unavailable; confirm which connector is configured.

What will we cover in a PostgreSQL integration demo?

Start with one workflow and a sample record from Tables. We can review how to identify the record, connect related data, set the update direction, and test recovery. Include the person who owns the source system and anyone who will maintain the integration; you do not need a finished requirements document.

Explore PostgreSQL connections

Choose the other system in your workflow. Each guide explains the connection options, available operations, field mapping, and setup checks for that pair.

293 integration guides

SECURITY

Security teams trust Stacksync

As a data company, we understand the importance of keeping your data secure. Stacksync is built with security best practices to keep your data safe at every layer, and is DPF-certified for US, EU, UK and CH data transfers.

SOC 2 Type II
ISO 27001
HIPAA BAA
GDPR
CCPA
DPF US-EU-UK-CH
→ SECURITY WITH BENEFITS

SSO & SCIM

Let your users access Stacksync from your centralized user management systems. Works with Okta, Azure, Google SSO and more.

Alerts

Immediately get alerted about record syncing issues over email, Slack, PagerDuty and WhatsApp. Resolve issues from a centralized dashboard with retry and revert options.

Secure connection options

Securely connects to your systems with:

Coworkers laughing in front of a laptop in a casual office setting

Connect the systems your business runs on.
Build your next workflow with Stacksync.