forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd01d4f2
committed
Fix failure with lock mode used for custom relation options
In-core relation options can use a custom lock mode since47167b7, thathas lowered the lock available for some autovacuum parameters. Howeverit forgot to consider custom relation options. This causes failureswith ALTER TABLE SET when changing a custom relation option, as its lockis not defined. The existing APIs to define a custom reloption does notallow to define a custom lock mode, so enforce its initialization toAccessExclusiveMode which should be safe enough in all cases. Anupcoming patch will extend the existing APIs to allow a custom lock modeto be defined.The problem can be reproduced with bloom indexes, so add a test there.Reported-by: Nikolay SharplovAnalyzed-by: Thomas Munro, Michael PaquierAuthor: Michael PaquierReviewed-by: Kuntal GhoshDiscussion:https://postgr.es/m/20190920013831.GD1844@paquier.xyzBackpatch-through: 9.61 parent7cd99d3 commitd01d4f2
File tree
3 files changed
+9
-0
lines changed- contrib/bloom
- expected
- sql
- src/backend/access/common
3 files changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
651 | 658 | | |
652 | 659 | | |
653 | 660 | | |
| |||
0 commit comments
Comments
(0)