- Notifications
You must be signed in to change notification settings - Fork28
Commitc015560
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 parent6a781c4 commitc015560
2 files changed
+13
-9
lines changedLines changed: 8 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1064 | 1064 |
| |
1065 | 1065 |
| |
1066 | 1066 |
| |
1067 |
| - | |
1068 |
| - | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
1069 | 1070 |
| |
1070 |
| - | |
| 1071 | + | |
1071 | 1072 |
| |
1072 | 1073 |
| |
1073 | 1074 |
| |
| |||
1175 | 1176 |
| |
1176 | 1177 |
| |
1177 | 1178 |
| |
1178 |
| - | |
1179 |
| - | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
1180 | 1182 |
| |
1181 | 1183 |
| |
1182 |
| - | |
| 1184 | + | |
1183 | 1185 |
| |
1184 | 1186 |
| |
1185 | 1187 |
| |
|
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 |
| |
| |||
591 | 592 |
| |
592 | 593 |
| |
593 | 594 |
| |
594 |
| - | |
595 |
| - | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
596 | 598 |
| |
597 |
| - | |
| 599 | + | |
598 | 600 |
| |
599 | 601 |
| |
600 | 602 |
| |
|
0 commit comments
Comments
(0)