forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit707f38e
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 parent8728552 commit707f38e
File tree
3 files changed
+9
-0
lines changed- contrib/bloom
- expected
- sql
- src/backend/access/common
3 files changed
+9
-0
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
| 8 | + | |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| 10 | + | |
10 | 11 |
| |
11 | 12 |
| |
12 | 13 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
659 | 659 |
| |
660 | 660 |
| |
661 | 661 |
| |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
662 | 669 |
| |
663 | 670 |
| |
664 | 671 |
| |
|
0 commit comments
Comments
(0)