logical replication

Tech Optimizer
August 18, 2025
The PostgreSQL Global Development Group has released security and maintenance updates for versions 17.6, 16.10, 15.14, 14.19, 13.22, and the third beta of PostgreSQL 18. The updates address three critical vulnerabilities: 1. CVE-2025-8714 (CVSS 8.8) - Allows code injection during dump restoration via pg_dump operations. 2. CVE-2025-8715 (CVSS 8.8) - Enables SQL injection through newline injection in object names during pg_dump. 3. CVE-2025-8713 (CVSS 3.1) - Exposes optimizer statistics data. The update also improves BRIN index performance, logical replication, and resolves WAL segment removal issues. PostgreSQL 13 will reach end-of-life on November 13, 2025. The third beta of PostgreSQL 18 is in development, with general availability expected in September-October 2025. Administrators should perform reindexing after the upgrade if using specific BRIN indexes.
Tech Optimizer
July 17, 2025
Amazon Web Services (AWS) has launched pgactive, an open-source extension for PostgreSQL that enables active-active replication, allowing databases to stream data asynchronously between instances. Announced in June 2025, pgactive was previously proprietary within AWS's Relational Database Service (RDS) and first appeared in late 2023. The extension supports conflict resolution and bidirectional data syncing, enhancing resiliency for high-availability applications. It is available under the Apache 2.0 license, encouraging community contributions and customization. Pgactive's architecture includes logical replication slots and customizable conflict handlers, essential for fault-tolerant systems. The open-source model promotes transparency and peer review, with potential integrations discussed in developer communities. The initiative aims to transform enterprise database replication and empower developers to innovate without vendor lock-in.
Tech Optimizer
June 21, 2025
The Amazon Aurora PostgreSQL-Compatible Edition supports managed blue/green deployments to minimize downtime and risks during updates. This deployment strategy involves creating a staging environment (green) that mirrors the production database (blue) through logical replication. The blue environment represents the current production database, while the green environment incorporates updates without changing the application endpoint. After validating changes, the green environment can be promoted to production. In case of issues post-upgrade, a rollback plan is essential, as the managed blue/green deployment feature does not provide built-in rollback functionality. A manual rollback cluster can be established using self-managed logical replication to maintain synchronization with the new version after a switchover. Before the switchover, two clusters exist: the blue cluster (production) and the green cluster (staging). After the switchover, three clusters are present: the old blue cluster (original production), the new blue cluster (updated production), and the blue prime (rollback) cluster (a clone of the old blue cluster). To implement the solution, prerequisites include a cluster parameter group for the new version database with logical replication enabled and familiarity with the Aurora cloning feature. The process involves creating a blue/green deployment, stopping traffic on the blue cluster, performing the switchover, deleting the blue/green deployment, cloning the old blue cluster to create the blue prime cluster, and establishing logical replication from the new blue cluster to the blue prime cluster. Limitations of the managed blue/green deployment include the inability to replicate certain DDL operations and the need to handle endpoint changes manually if a rollback is required. Setting up the rollback cluster incurs additional downtime. To roll back to the blue prime cluster, application traffic must be ceased, the application or DNS records updated, the subscription on the blue prime cluster dropped, and sequence values manually updated if necessary. This process is not automatic and requires careful planning and testing. In production, it is advisable to retain the new blue prime cluster until all applications have transitioned successfully, and the old blue cluster can be backed up for compliance before deletion. For testing purposes, all clusters should be deleted to avoid additional charges.
Tech Optimizer
May 21, 2025
Upgrading to Graviton4-based R8g instances with Aurora PostgreSQL-Compatible 17.4 in an Aurora I/O-Optimized cluster configuration results in significant performance improvements. The new instances provide up to 1.7 times higher write throughput, 1.38 times better price-performance, and reduce commit latency by up to 46% on r8g.16xlarge instances and 38% on r8g.2xlarge instances compared to Graviton2-based R6g instances. The Amazon Aurora PostgreSQL-Compatible Edition now supports AWS Graviton4-based R8g instances and PostgreSQL 17.4, which introduces performance enhancements for I/O-Optimized configurations, optimizing write operations and batch processing. R8g instances offer up to 192 vCPUs and 1.5 TB of memory, supporting larger configurations and providing up to 50 Gbps of network bandwidth. PostgreSQL 17 includes vacuum improvements, eliminates the need to drop logical replication slots during upgrades, and expands SQL/JSON standards. Aurora PostgreSQL-Compatible separates compute from storage, enabling independent scaling and maintaining six-way replication for durability, while processing changes as log records to reduce I/O operations. Performance benchmarks using HammerDB show improvements in throughput and commit latency across various workloads. For small workloads on 2xlarge instance size, throughput increased by 50.25% and commit latency improved by 33.87%. For medium workloads on 16xlarge instance size, throughput increased by 30% and commit latency improved by 17.44%. The most significant performance benefits arise from combining hardware upgrades from Graviton2 to Graviton4 with database engine upgrades from PostgreSQL 15.10 to 17.4. For small workloads, throughput increased by 70% and commit latency improved by 38.71%. For medium workloads, throughput increased by 70% and commit latency improved by 46.67%. Cost efficiency is also enhanced, with a 38% improvement in price performance and a 61.26% improvement in price-performance ratio when comparing Graviton2 and Graviton4 instances. Reserved Instances for Graviton4-based R8g instances offer additional cost-optimization opportunities.
Tech Optimizer
April 24, 2025
TencentDB for PostgreSQL has introduced robust security measures including data encryption, Virtual Private Cloud (VPC) isolation, and process monitoring for compliance with international standards. PostgreSQL 17.0 features enhanced logical replication with slot failover, performance optimizations such as batch I/O page read/write and improved Write-Ahead Logging, and operational enhancements like incremental backups and a transaction timeout parameter. Tencent has developed features for resource management, including fine-grained multi-tenant resource management with CPU resource isolation and process-level monitoring, as well as SQL throttling. Cold/hot data separation solutions include the 'cos_fdw' plugin for accessing cold data and the 'starocks_fdw' plugin for integrating with the StarRocks analytics engine. Security auditing has been improved with an Express Edition for basic needs and an Advanced Edition for broader audit coverage. These enhancements aim to balance performance and cost, maximize resource efficiency, and strengthen compliance.
Tech Optimizer
April 21, 2025
The AWS Database Migration Service (AWS DMS) provides a managed solution for migrating and replicating databases to AWS, supporting both homogeneous and heterogeneous migrations. It allows seamless data migration from PostgreSQL databases to any supported target and vice versa. Open-source PostgreSQL regularly releases new versions, and Amazon RDS aims to support these within five months. Upgrading PostgreSQL instances is essential for security and compliance. Minor version upgrades focus on security and bug fixes without adding new functionalities, while major upgrades can change system tables and data formats. AWS DMS tasks require careful management during PostgreSQL upgrades. For minor upgrades, ongoing DMS tasks should be stopped and then resumed post-upgrade. For major upgrades, replication slots must be dropped before the upgrade, which will invalidate ongoing DMS tasks. After the upgrade, a new CDC-only task should be created to resume data migration. Minor version upgrades of the target PostgreSQL database do not affect AWS DMS CDC tasks, but major upgrades require stopping the DMS task, performing the upgrade, and ensuring compatibility with the replication instance before resuming the task.
Search