diff options
author | Michael Paquier <michael@paquier.xyz> | 2019-09-27 09:31:20 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2019-09-27 09:31:20 +0900 |
commit | fbfa5664882c9b61428266e6fb0d48b0147c421a (patch) | |
tree | 8c8787c2230f0857ad5842977d42518d8cfb1ec9 /src/backend/access/common/reloptions.c | |
parent | 8190164e82ae03bde80864ab0941794a90e70483 (diff) | |
download | postgresql-fbfa5664882c9b61428266e6fb0d48b0147c421a.tar.gz postgresql-fbfa5664882c9b61428266e6fb0d48b0147c421a.zip |
Fix lockmode initialization for custom relation options
The code was enforcing AccessExclusiveLock for all custom relation
options, which is incorrect as the APIs allow a custom lock level to be
set.
While on it, fix a couple of inconsistencies in the tests and the README
of dummy_index_am.
Oversights in commit 773df88.
Discussion: https://postgr.es/m/20190925234152.GA2115@paquier.xyz
Diffstat (limited to 'src/backend/access/common/reloptions.c')
-rw-r--r-- | src/backend/access/common/reloptions.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c index 85627a05a35..b5072c00fe5 100644 --- a/src/backend/access/common/reloptions.c +++ b/src/backend/access/common/reloptions.c @@ -700,13 +700,6 @@ allocate_reloption(bits32 kinds, int type, const char *name, const char *desc, newoption->type = type; newoption->lockmode = lockmode; - /* - * 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; |