postgres/src
Michael Paquier 736b84eede 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:07:23 +09:00
..
backend Fix failure with lock mode used for custom relation options 2019-09-25 10:07:23 +09:00
bin Rework WAL-reading supporting structs 2019-09-24 16:39:53 -03:00
common Refactor logic to remove trailing CR/LF characters from strings 2019-08-09 11:05:14 +09:00
fe_utils Fix memory leak coming from simple lists built in reindexdb 2019-07-30 10:54:48 +09:00
include Rework WAL-reading supporting structs 2019-09-24 16:39:53 -03:00
interfaces Add libpq parameter 'channel_binding'. 2019-09-23 14:03:35 -07:00
makefiles Remove support for non-ELF BSD systems 2019-07-01 23:56:20 +01:00
pl Split tuptoaster.c into three separate files. 2019-09-05 13:15:10 -04:00
port Use explicit_bzero 2019-09-05 08:30:42 +02:00
template
test Prevent bogus pullup of constant-valued functions returning composite. 2019-09-24 12:11:32 -04:00
timezone Update time zone data files to tzdata release 2019c. 2019-09-20 19:53:33 -04:00
tools Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:48:39 +03:00
tutorial Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in Don't disable ccache when building with coverage support 2019-09-24 10:00:56 +02:00
Makefile.shlib Remove support for non-ELF BSD systems 2019-07-01 23:56:20 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00