aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/common/reloptions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/common/reloptions.c')
-rw-r--r--src/backend/access/common/reloptions.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c
index db84da06789..77eebb681f6 100644
--- a/src/backend/access/common/reloptions.c
+++ b/src/backend/access/common/reloptions.c
@@ -648,6 +648,13 @@ allocate_reloption(bits32 kinds, int type, const char *name, const char *desc)
newoption->namelen = strlen(name);
newoption->type = type;
+ /*
+ * Set the default lock mode for this option. There is no actual way
+ * for a module to enforce it when declaring a custom relation option,
+ * so just use the highest level, which is safe for all cases.
+ */
+ newoption->lockmode = AccessExclusiveLock;
+
MemoryContextSwitchTo(oldcxt);
return newoption;