Common Issues
Solutions to frequently encountered problems
This page covers common issues users encounter with PostgresCompare and their solutions.
Connection Issues
Cannot connect to database
Symptoms:
- Connection timeout
- Connection refused errors
Solutions:
- Verify connection details
- Double-check host, port, database name, username, and password
- Test connection with
psqlto confirm credentials work
- Check network connectivity
# Test if port is reachable telnet db.example.com 5432 # Or use nc nc -zv db.example.com 5432 - Check PostgreSQL configuration
- Ensure PostgreSQL is listening on the correct interface
- Check
listen_addressesinpostgresql.conf - Verify
pg_hba.confallows connections from your IP
- Firewall rules
- Check local firewall settings
- Check cloud security groups (AWS, Azure, GCP)
- Check VPN requirements
SSL connection errors
Symptoms:
- “SSL connection is required”
- Certificate verification errors
Solutions:
- Set appropriate SSL mode
- Use
sslmode=requirefor encrypted connection without certificate verification - Use
sslmode=verify-fullfor production with proper certificates
- Use
- Certificate issues
- Ensure certificate files are readable
- Verify certificate hasn’t expired
- Check certificate chain is complete
Authentication failed
Symptoms:
- “password authentication failed for user”
- “no pg_hba.conf entry for host”
Solutions:
- Verify credentials
- Confirm username and password are correct
- Check for special characters that may need escaping
- Check pg_hba.conf
- Ensure your IP/host is listed
- Verify authentication method (md5, scram-sha-256, etc.)
- User permissions
- Confirm user exists in the database
- Verify user has CONNECT privilege
Comparison Issues
Comparison takes too long
Symptoms:
- Progress bar stalls
- Application becomes unresponsive
Solutions:
- Limit scope
- Use schema filters to compare only relevant schemas
- Exclude large schemas you don’t need
- Check database load
- Compare during low-usage periods
- Use a read replica if available
Missing objects in comparison
Symptoms:
- Expected tables/views not appearing
- Objects show as identical when they’re different
Solutions:
- Check schema filters
- Review Project Settings > Schema Filters
- Ensure the schema isn’t excluded
- Check comparison options
- Review Project Settings > Comparison Options
- Check if the object type is disabled or if an exclusion pattern matches
- Check object type filters
- Ensure the object type is enabled in settings
- Permissions
- Verify the database user has SELECT access to the object
- Some metadata requires additional grants
Differences shown incorrectly
Symptoms:
- Objects marked different when they’re the same
- Wrong ALTER statements generated
Solutions:
- Check comparison options
- Review options like “Ignore whitespace” and “Ignore column order”
- Adjust to match your needs
- Clear and refresh
- Close and reopen the project
- Run comparison again
- Check PostgreSQL versions
- Syntax differences between versions may cause false positives
- Some features aren’t available in older versions
Script Generation Issues
Script fails to execute
Symptoms:
- Syntax errors when running script
- Dependency errors
Solutions:
- Check PostgreSQL version compatibility
- Generated SQL may use features not in target version
- Review script for version-specific syntax
- Run in order
- PostgresCompare orders by dependency
- Don’t reorder statements manually unless necessary
- Handle existing objects
- Refresh the comparison to get the current state
- Review the script for conflicts with existing objects
Foreign key errors
Symptoms:
- “insert or update on table violates foreign key constraint”
- “cannot drop table because other objects depend on it”
Solutions:
- Check data integrity
- Ensure referenced data exists before creating foreign keys
- Handle orphaned records
- Use CASCADE
- Enable CASCADE for drops if appropriate
- Be aware this will drop dependent objects
- Disable constraints temporarily
SET session_replication_role = replica; -- Run your script SET session_replication_role = DEFAULT;
Lock timeout errors
Symptoms:
- “canceling statement due to lock timeout”
- “deadlock detected”
Solutions:
- Deploy during low traffic
- Schedule for maintenance windows
- Reduce concurrent connections
- Use lock timeout
SET lock_timeout = '5s'; - Split into smaller transactions
- Run statements individually
- Commit between major changes
Application Issues
PostgresCompare won’t start
Solutions:
- Check system requirements
- Verify OS version is supported
- Ensure sufficient disk space and memory
- Reinstall
- Download latest version from website
- Uninstall and reinstall
- Check logs
- Check the application logs for error details
License issues
Symptoms:
- “License expired” message
- “Invalid license key”
Solutions:
- Verify license key
- Check for typos in the key
- Ensure no extra spaces
- Check license status
- Visit your account at postgrescompare.com
- Verify license hasn’t expired
- Internet connectivity
- License validation requires internet access
- Check firewall allows outbound HTTPS
Crash or hang
Solutions:
- Save your work
- Save projects frequently
- Check for updates
- Install latest version
- Review release notes for fixes
- Report the issue
- Include steps to reproduce
- Attach log files
- Contact [email protected]
Getting Help
If you can’t resolve your issue:
- Check the FAQ - FAQ page
- Search articles - Articles page
- Contact support - Contact page
When contacting support, include:
- PostgresCompare version
- Operating system
- PostgreSQL version(s)
- Steps to reproduce the issue
- Error messages or screenshots
- Log files if applicable
Next Steps
- Error Messages - Specific error explanations
- FAQ - Frequently asked questions