logical replication apply to run with sync commit off by default

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>
Subject: logical replication apply to run with sync commit off by default
Date: 2017-03-07 05:23:29
Message-ID: 753196b0-255a-8882-ace7-fd35cf5d9176@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

there has been discussion at the logical replication initial copy thread
[1] about making apply work with sync commit off by default for
performance reasons and adding option to change that per subscription.

Here I propose patch to implement this - it adds boolean column
subssynccommit to pg_subscription catalog which decides if
synchronous_commit should be off or local for apply. And it adds
SYNCHRONOUS_COMMIT = boolean to the list of WITH options for CREATE and
ALTER SUBSCRIPTION. When nothing is specified it will set it to false.

The patch is built on top of copy patch currently as there are conflicts
between the two and this helps a bit with testing of copy patch.

[1]
https://www.postgresql.org/message-id/CA+TgmoY7Lk2YKArcp4O=Qu=xOoR8j71MAd1OTEojAWmujE3k0w@mail.gmail.com

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
Add-option-to-modify-sync-commit-per-subscription.patch binary/octet-stream 20.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-03-07 05:30:13 Re: [NOVICE] opr_charset rule in gram.y
Previous Message Ashutosh Sharma 2017-03-07 05:16:15 Re: increasing the default WAL segment size