forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit52ad5fc
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 parent1eb8a5e commit52ad5fc
2 files changed
+13
-9
lines changedLines changed: 8 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1062 | 1062 |
| |
1063 | 1063 |
| |
1064 | 1064 |
| |
1065 |
| - | |
1066 |
| - | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
1067 | 1068 |
| |
1068 |
| - | |
| 1069 | + | |
1069 | 1070 |
| |
1070 | 1071 |
| |
1071 | 1072 |
| |
| |||
1173 | 1174 |
| |
1174 | 1175 |
| |
1175 | 1176 |
| |
1176 |
| - | |
1177 |
| - | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
1178 | 1180 |
| |
1179 | 1181 |
| |
1180 |
| - | |
| 1182 | + | |
1181 | 1183 |
| |
1182 | 1184 |
| |
1183 | 1185 |
| |
|
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 |
| |
| |||
587 | 588 |
| |
588 | 589 |
| |
589 | 590 |
| |
590 |
| - | |
591 |
| - | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
592 | 594 |
| |
593 |
| - | |
| 595 | + | |
594 | 596 |
| |
595 | 597 |
| |
596 | 598 |
| |
|
0 commit comments
Comments
(0)