postgresql/contrib/bloom
Michael Paquier d01d4f2374 Fix failure with lock mode used for custom relation options
In-core relation options can use a custom lock mode since 47167b7, that
has lowered the lock available for some autovacuum parameters.  However
it forgot to consider custom relation options.  This causes failures
with ALTER TABLE SET when changing a custom relation option, as its lock
is not defined.  The existing APIs to define a custom reloption does not
allow to define a custom lock mode, so enforce its initialization to
AccessExclusiveMode which should be safe enough in all cases.  An
upcoming patch will extend the existing APIs to allow a custom lock mode
to be defined.

The problem can be reproduced with bloom indexes, so add a test there.

Reported-by: Nikolay Sharplov
Analyzed-by: Thomas Munro, Michael Paquier
Author: Michael Paquier
Reviewed-by: Kuntal Ghosh
Discussion: https://postgr.es/m/20190920013831.GD1844@paquier.xyz
Backpatch-through: 9.6
2019-09-25 10:08:30 +09:00
..
expected Fix failure with lock mode used for custom relation options 2019-09-25 10:08:30 +09:00
sql Fix failure with lock mode used for custom relation options 2019-09-25 10:08:30 +09:00
t Don't fall off the end of perl functions 2018-05-27 09:08:42 -04:00
.gitignore Bloom index contrib module 2016-04-01 16:42:24 +03:00
Makefile Bloom index contrib module 2016-04-01 16:42:24 +03:00
blcost.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
blinsert.c Avoid using potentially-under-aligned page buffers. 2018-09-01 15:27:13 -04:00
bloom--1.0.sql Minor fixes in contrib installation scripts. 2016-06-14 10:47:06 -04:00
bloom.control Bloom index contrib module 2016-04-01 16:42:24 +03:00
bloom.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
blscan.c Fix misc typos, mostly in comments. 2018-07-18 16:17:42 +03:00
blutils.c Indexes with INCLUDE columns and their support in B-tree 2018-04-07 23:00:39 +03:00
blvacuum.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
blvalidate.c Update copyright for 2018 2018-01-02 23:30:12 -05:00