forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita524f50
committed
Improve the check for pg_catalog.unknown data type in pg_upgrade
The pg_upgrade check for pg_catalog.unknown type when upgrading from 9.6had a couple of issues with domains and composite types - it detectedeven composite types unused in objects with storage. So for example thiswas enough to trigger an unnecessary pg_upgrade failure: CREATE TYPE unknown_composite AS (u pg_catalog.unknown)On the other hand, this only happened with composite types directly onthe pg_catalog.unknown data type, but not with a domain. So this was notdetected CREATE DOMAIN unknown_domain AS pg_catalog.unknown; CREATE TYPE unknown_composite_2 AS (u unknown_domain);unlike the first example. These false positives and inconsistencies areunfortunate, but what's worse we've failed to detected objects using thepg_catalog.unknown type through a domain. So we missed cases like this CREATE TABLE t (u unknown_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. Backpatch allthe way to 10, where the of pg_catalog.unknown data type was restricted.Author: Tomas VondraBackpatch-to: 10-Discussion:https://postgr.es/m/16045-673e8fa6b5ace196%40postgresql.org1 parent8d48e6a commita524f50
1 file changed
+27
-3
lines changedLines changed: 27 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
229 | 229 |
| |
230 | 230 |
| |
231 | 231 |
| |
232 |
| - | |
| 232 | + | |
| 233 | + | |
233 | 234 |
| |
234 | 235 |
| |
235 | 236 |
| |
| |||
256 | 257 |
| |
257 | 258 |
| |
258 | 259 |
| |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
259 | 266 |
| |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
260 | 285 |
| |
261 | 286 |
| |
262 | 287 |
| |
263 | 288 |
| |
264 | 289 |
| |
265 | 290 |
| |
266 |
| - | |
| 291 | + | |
267 | 292 |
| |
268 | 293 |
| |
269 |
| - | |
270 | 294 |
| |
271 | 295 |
| |
272 | 296 |
| |
|
0 commit comments
Comments
(0)