$linuxjunkies
>

pglogical

pglogical is a logical replication extension for PostgreSQL that enables real-time data synchronization between databases without requiring physical file-level replication.

pglogical is a PostgreSQL extension that implements logical replication—a method of copying data changes at the SQL command level rather than at the physical storage block level. It allows you to replicate specific tables or entire databases between PostgreSQL instances, even across different major versions or hardware architectures.

Unlike physical replication (such as streaming replication), pglogical replicates the logical changes (INSERT, UPDATE, DELETE operations) rather than the raw data blocks. This provides flexibility for tasks like upgrading PostgreSQL versions, selecting which tables to replicate, and performing bidirectional synchronization.

For example, you might use pglogical to keep a reporting database in sync with a production database in real-time, or to migrate data between PostgreSQL clusters with minimal downtime.

Related terms