forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8d48e6a
committed
Improve the check for pg_catalog.line data type in pg_upgrade
The pg_upgrade check for pg_catalog.line data type when upgrading from9.3 had a couple of issues with domains and composite types. Firstly, ittriggered false positives for composite types unused in objects withstorage. This was enough to trigger an unnecessary pg_upgrade failure: CREATE TYPE line_composite AS (l pg_catalog.line)On the other hand, this only happened with composite types directly onthe pg_catalog.line data type, but not with a domain. So this was notdetected CREATE DOMAIN line_domain AS pg_catalog.line; CREATE TYPE line_composite_2 AS (l line_domain);unlike the first example. These false positives and inconsistencies areunfortunate, but what's worse we've failed to detected objects using thepg_catalog.line data type through a domain. So we missed cases like this CREATE TABLE t (l line_composite_2);The consequence is clusters broken after a pg_upgrade.This fixes these false positives and false negatives by using the samerecursive CTE introduced byeaf900e for sql_identifier. 9.3 did notsupport domains on composite types, but we can still have multi-levelcomposite types.Backpatch all the way to 9.4, where the format for pg_catalog.line datatype changed.Author: Tomas VondraBackpatch-to: 9.4-Discussion:https://postgr.es/m/16045-673e8fa6b5ace196%40postgresql.org1 parentae5cae5 commit8d48e6a
1 file changed
+29
-1
lines changedLines changed: 29 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
134 | 140 |
| |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
135 | 159 |
| |
136 | 160 |
| |
137 | 161 |
| |
138 | 162 |
| |
139 | 163 |
| |
140 | 164 |
| |
141 |
| - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
142 | 170 |
| |
143 | 171 |
| |
144 | 172 |
| |
|
0 commit comments
Comments
(0)