postgresql/contrib/bloom
Michael Paquier 707f38e38e 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:26 +09:00
..
expected Fix failure with lock mode used for custom relation options 2019-09-25 10:08:26 +09:00
sql Fix failure with lock mode used for custom relation options 2019-09-25 10:08:26 +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 Add PGXS options to control TAP and isolation tests, take two 2018-12-03 09:27:35 +09:00
blcost.c Refactor index cost estimation functions in view of IndexClause changes. 2019-02-15 13:05:19 -05:00
blinsert.c Report progress of CREATE INDEX operations 2019-04-02 15:18:08 -03: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 Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
blscan.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
blutils.c Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
blvacuum.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
blvalidate.c Update copyright for 2019 2019-01-02 12:44:25 -05:00