Experimental feature: PostgreSQL connector is currently in beta. We’re actively improving sync reliability and adding more features.
Prerequisites
- A PostgreSQL database (version 9.4 or later)
- Database access credentials (host, port, database name, username, password)
- Network access from Fivetran’s IP addresses to your database
- One of the following update methods enabled:
- XMIN (recommended): Simple change tracking using PostgreSQL’s transaction ID system
- WAL (Write-Ahead Log): More advanced change data capture
- Teleport: Direct query-based replication
Connecting PostgreSQL
1
Navigate to Sources
From the Sources page, click on “PostgreSQL” in the Available Sources section

2
Start connection
Click “Connect” to begin the setup process

3
Authorize with Fivetran
AstroBee uses Fivetran to securely connect to PostgreSQL. Click “Continue” to proceed
Fivetran ensures:

- Secure: Data transfer is encrypted end-to-end using TLS/SSL
- Private: Your credentials are encrypted and never exposed
4
Configure connection settings
Follow the setup guide on the right for detailed configuration instructions from Fivetran.
Configure your PostgreSQL connection with the following details:Basic connection information:

- Host: Your PostgreSQL server hostname or IP address
- Port: Database port (default: 5432)
- Database: Name of the database to connect to
- User: PostgreSQL username with read access
- Password: Database user password
- XMIN (recommended for most cases): Uses PostgreSQL’s transaction ID system
- WAL with pg_output: More efficient for high-volume changes
- Teleport: Direct query-based replication
- Enable SSH tunnel option
- Provide SSH host, port, and authentication details
- How to create a read-only database user for Fivetran
- Configuring WAL settings for change data capture
- Setting up SSH tunnels and network access
- SSL/TLS certificate requirements
5
Select tables to sync
Back in AstroBee, your database schema is being analyzed. This typically takes 10 seconds to 10 minutes depending on your database size.Once the schema is loaded, select which tables to include in your analysis. Your PostgreSQL database may include tables like:
Click “Save” to complete the setup
- users: User account information
- orders: Transaction and order records
- products: Product catalog data
- events: Application event logs
- sessions: User session tracking
- Custom application tables specific to your database

6
Connection complete
Your PostgreSQL connection is now active and appears in “My Sources”

What happens next
After connecting PostgreSQL, you can create a data layer to start querying your database. Click “Create Data Layer” to let AstroBee analyze your PostgreSQL tables and generate a business model for natural language queries.Syncing data
PostgreSQL connections use manual sync - you control when data is refreshed. To sync your latest database data:- Navigate to the Sources page
- Find your PostgreSQL connection
- Click the “Sync now” button
Understanding PostgreSQL data
PostgreSQL syncs table data along with schema information:- Table structure: Column names, data types, primary keys, and foreign keys
- Row data: Actual records from selected tables
- Relationships: Detected relationships between tables based on foreign key constraints
- Change tracking: Incremental updates based on your chosen update method (XMIN, WAL, or Teleport)
Troubleshooting
For additional help, see Fivetran’s PostgreSQL troubleshooting guide.Connection timeout or cannot connect
Connection timeout or cannot connect
Issue: Unable to connect to PostgreSQL database.Solution:
- Verify your database host, port, and credentials are correct
- Ensure your database is running and accessible
- Check that Fivetran’s IP addresses are allowlisted in your firewall
- Confirm network connectivity between Fivetran and your database
- Test your credentials with a local PostgreSQL client first
- Verify SSL/TLS requirements if your database requires encrypted connections
Authentication failed
Authentication failed
Issue: Connection fails with authentication error.Solution:
- Verify your PostgreSQL username and password are correct
- Ensure the user has SELECT permissions on the tables you want to sync
- Check that the user has access to the specified database
- Confirm the user account is active and not locked
- For WAL-based sync, ensure the user has REPLICATION permissions
- Review PostgreSQL’s pg_hba.conf to ensure the connection method is allowed
No tables appearing after connection
No tables appearing after connection
Issue: Connection succeeds but no tables are available to select.Solution:
- Verify the database user has permissions to view table schemas
- Check that the database has tables in the public schema or specified schemas
- Ensure the user has SELECT permission on information_schema tables
- Confirm you’re connecting to the correct database
- Look for tables in non-public schemas (may require additional permissions)
Sync fails or data not updating
Sync fails or data not updating
Issue: Initial sync fails or incremental syncs don’t capture changes.Solution:
- Check database logs for connection errors or permission issues
- For XMIN: Verify tables have xmin column tracking enabled
- For WAL: Ensure wal_level is set to ‘logical’ and max_replication_slots is sufficient
- Verify the database user still has valid credentials
- Check for long-running transactions that may block replication
- Trigger a manual re-sync to refresh the connection
- Contact support@astrobee.ai if issues persist after checking permissions
Large sync times or performance issues
Large sync times or performance issues
Issue: Syncing takes longer than expected or impacts database performance.Solution:
- Large databases with millions of rows can take hours for initial sync
- Consider syncing only necessary tables to reduce load
- Schedule syncs during off-peak hours to minimize impact
- For WAL-based sync, monitor replication lag in PostgreSQL
- Check database CPU and memory usage during sync
- Consider creating indexes on timestamp columns used for change tracking
- Use XMIN update method for better performance on smaller databases
SSH tunnel connection issues
SSH tunnel connection issues
Issue: Cannot connect when using SSH tunnel.Solution:
- Verify SSH host, port, and credentials are correct
- Ensure the SSH user has permission to create tunnels
- Check that the SSH server is running and accessible
- Confirm the database is reachable from the SSH server
- Test SSH connection manually before configuring in Fivetran
- Review SSH server logs for authentication or connection errors











