Planet PostgreSQL

Planet PostgreSQL -

Roberto Mello: Logical Replication on Standbys in Postgres 16

Postgres 16 is hot off the press with the beta release last week. I am really excited about the new feature that allows logical replication from standbys, allowing users to: create logical decoding from a read-only standby reduce the workload on the primary server have new ways to achieve high-availability for applications that require data synchronization across multiple systems or for auditing purposes A second relevant and exciting new feature coming in 16 is that replication slots on a given standby persist the promotion of that standby to a primary. This means that in the event of primary server failure and promotion of a standby to primary, the replication slots will persist and the former-standby subscribers will not be affected. These two together give PostgreSQL a huge boost in performance for big data operations. Applications moving data around in physical locations and folks doing data warehousing, analytics, data integration, and business intelligence. I’m going to walk through an example schema and database setup and offer some sample settings and code for creating logical replication from a standby. Background on replication At a high level PostgreSQL supports two main types of replication - streaming/physical and logical. The Write-Ahead Log can stream the entire set of physical files through a connection and represents the entire database on disk. Logical replication offers a more fine-grained approach, where you can specify individual database objects, such as tables or even specific rows, to be replicated to a remote server. You can read more about logical replication basics in Data To Go: Postgres Logical Replication. A standby server in PostgreSQL is created by taking a base backup of the primary server and continuously applying all changes made on the primary. A hot standby is a standby server that can be promoted to become the primary server. PostgreSQL saves modifications in WAL (Write-Ahead Log) records and replicates them from the primary server to [...]

PostgreSQL 16 beta release introduces logical replication from standbys and persistent replication slots after failover, enhancing big data operations, data warehousing, analytics, data integration, and business intelligence. Users can specify individual database objects for replication to a remote server. Documentation for this new feature is being improved.

PostgreSQL failover logical replication postgres replication slots standbys

相关推荐 去reddit讨论

热榜 Top10

观测云
观测云
Dify.AI
Dify.AI
eolink
eolink
LigaAI
LigaAI

推荐或自荐