summaryrefslogtreecommitdiff
path: root/src/backend/catalog/pg_subscription.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-04-14 13:58:46 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-04-14 13:58:46 -0400
commit887227a1cc861d87ca0f175cf8bd1447554090eb (patch)
treef0cc0f4315bd0489083742d4f7a3285fa749f2e9 /src/backend/catalog/pg_subscription.c
parent25371a72b95aab43b0a3547ead4d3286c1128351 (diff)
downloadpostgresql-887227a1cc861d87ca0f175cf8bd1447554090eb.tar.gz
Add option to modify sync commit per subscription
This also changes default behaviour of subscription workers to synchronous_commit = off. Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Diffstat (limited to 'src/backend/catalog/pg_subscription.c')
-rw-r--r--src/backend/catalog/pg_subscription.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/catalog/pg_subscription.c b/src/backend/catalog/pg_subscription.c
index 7e38b1a31c..a18385055e 100644
--- a/src/backend/catalog/pg_subscription.c
+++ b/src/backend/catalog/pg_subscription.c
@@ -85,6 +85,14 @@ GetSubscription(Oid subid, bool missing_ok)
Assert(!isnull);
sub->slotname = pstrdup(NameStr(*DatumGetName(datum)));
+ /* Get synccommit */
+ datum = SysCacheGetAttr(SUBSCRIPTIONOID,
+ tup,
+ Anum_pg_subscription_subsynccommit,
+ &isnull);
+ Assert(!isnull);
+ sub->synccommit = TextDatumGetCString(datum);
+
/* Get publications */
datum = SysCacheGetAttr(SUBSCRIPTIONOID,
tup,