summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPeter Eisentraut2017-06-07 17:49:14 +0000
committerPeter Eisentraut2017-06-07 17:49:14 +0000
commit644ea35fc1352d845299563c7ddfb8b524ed27d9 (patch)
treeb020ec700bd642a3556dc87f5547bfe73afd350b /src/include
parent15ce775faa428dc91027e4e2d6b7a167a27118b5 (diff)
Fix updating of pg_subscription_rel from workers
A logical replication worker should not insert new rows into pg_subscription_rel, only update existing rows, so that there are no races if a concurrent refresh removes rows. Adjust the API to be able to choose that behavior. Author: Masahiko Sawada <sawada.mshk@gmail.com> Reported-by: tushar <tushar.ahuja@enterprisedb.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/pg_subscription_rel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/catalog/pg_subscription_rel.h b/src/include/catalog/pg_subscription_rel.h
index 391f96b76e4..f5f61916768 100644
--- a/src/include/catalog/pg_subscription_rel.h
+++ b/src/include/catalog/pg_subscription_rel.h
@@ -71,7 +71,7 @@ typedef struct SubscriptionRelState
} SubscriptionRelState;
extern Oid SetSubscriptionRelState(Oid subid, Oid relid, char state,
- XLogRecPtr sublsn);
+ XLogRecPtr sublsn, bool update_only);
extern char GetSubscriptionRelState(Oid subid, Oid relid,
XLogRecPtr *sublsn, bool missing_ok);
extern void RemoveSubscriptionRel(Oid subid, Oid relid);