210 days ago · Tech · 0 comments

Logical replication in PostgreSQL has steadily evolved since its introduction in version 10. In a previous blog post, I discussed how PostgreSQL 14 introduced streaming of large transactions. PostgreSQL 16 took this further by enabling parallel apply of large transactions via a non-default subscription option. Now, with PostgreSQL 18, parallel apply is the default behavior—marking a significant milestone in replication performance and scalability.In this post, we’ll explore how parallel apply works for large transactions and touch upon future plans for small transactions.Enabling Parallel ApplyFrom PostgreSQL 18 onwards, parallel apply is enabled by default. To explicitly configure it, users can set the streaming parameter to parallel when creating a subscription:postgres=# CREATE SUBSCRIPTION sub CONNECTION 'dbname=postgres' PUBLICATION pub WITH (streaming = parallel);NOTICE: created replication slot "sub" on publisherCREATE SUBSCRIPTION postgres=# SELECT subname, substream FROM…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.