- Notifications
You must be signed in to change notification settings - Fork28
Commitfff2a7d
committed
Don't access catalogs to validate GUCs when not connected to a DB.
Vignesh found this bug in the check function fordefault_table_access_method's check hook, but that was just copiedfrom older GUCs. Investigation by Michael and me then found the bug infurther places.When not connected to a database (e.g. in a walsender connection), wecannot perform (most) GUC checks that need database access. Even whenonly shared tables are needed, unless they'renailed (c.f. RelationCacheInitializePhase2()), they cannot be accessedwithout pg_class etc. being present.Fix by extending the existing IsTransactionState() checks to alsocheck for MyDatabaseOid.Reported-By: Vignesh C, Michael Paquier, Andres FreundAuthor: Vignesh C, Andres FreundDiscussion:https://postgr.es/m/CALDaNm1KXK9gbZfY-p_peRFm_XrBh1OwQO1Kk6Gig0c0fVZ2uw%40mail.gmail.comBackpatch: 9.4-1 parent92a8864 commitfff2a7d
File tree
3 files changed
+18
-12
lines changed- src/backend
- access/table
- commands
- utils/cache
3 files changed
+18
-12
lines changedLines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
| |||
119 | 120 |
| |
120 | 121 |
| |
121 | 122 |
| |
122 |
| - | |
123 |
| - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
124 | 126 |
| |
125 |
| - | |
| 127 | + | |
126 | 128 |
| |
127 | 129 |
| |
128 | 130 |
| |
|
Lines changed: 8 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1069 | 1069 |
| |
1070 | 1070 |
| |
1071 | 1071 |
| |
1072 |
| - | |
1073 |
| - | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
1074 | 1075 |
| |
1075 |
| - | |
| 1076 | + | |
1076 | 1077 |
| |
1077 | 1078 |
| |
1078 | 1079 |
| |
| |||
1190 | 1191 |
| |
1191 | 1192 |
| |
1192 | 1193 |
| |
1193 |
| - | |
1194 |
| - | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
1195 | 1197 |
| |
1196 | 1198 |
| |
1197 |
| - | |
| 1199 | + | |
1198 | 1200 |
| |
1199 | 1201 |
| |
1200 | 1202 |
| |
|
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
| 41 | + | |
41 | 42 |
| |
42 | 43 |
| |
43 | 44 |
| |
| |||
590 | 591 |
| |
591 | 592 |
| |
592 | 593 |
| |
593 |
| - | |
594 |
| - | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
595 | 597 |
| |
596 |
| - | |
| 598 | + | |
597 | 599 |
| |
598 | 600 |
| |
599 | 601 |
| |
|
0 commit comments
Comments
(0)