Menu

PostgreSQL 19's sequence replication only catches up when you tell it to
πŸ“°

PostgreSQL 19's sequence replication only catches up when you tell it to

DEV Community: postgresΒ·Alex GeorgievΒ·12 days ago
#mo1vtKlR
#devtopostgresql#devto#dev#test#subscriber
Reading 0:00
15s threshold

A logical replication subscriber in PostgreSQL has always replicated your rows and ignored your sequences. Promote it to primary after a failover, and the first few inserts try to reuse IDs that already exist on disk, because the subscriber's sequences never left their starting position. This is one of the standard reasons teams avoid logical replication for major-version upgrades or disaster recovery and reach for physical replication instead, even though physical replication can't filter which tables come across. PostgreSQL 19 is meant to fix the sequence half of that trade-off. I spent an afternoon with the release candidate trying to break it, and it is both a real fix and a narrower one than the release notes make it sound.

This is PostgreSQL 19 RC1, not a shipped release.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.