- Notifications
You must be signed in to change notification settings - Fork28
Commit7148050
committed
Give a better error for duplicate entries in VACUUM/ANALYZE column list.
Previously, the code didn't think about this case and would just try toanalyze such a column twice. That would fail at the point of insertingthe second version of the pg_statistic row, with obscure error messsageslike "duplicate key value violates unique constraint" or "tuple alreadyupdated by self", depending on context and PG version. We could allowthe case by ignoring duplicate column specifications, but it seems betterto reject it explicitly.The bogus error messages seem like arguably a bug, so back-patch toall supported versions.Nathan Bossart, per a report from Michael Paquier, and whackedaround a bit by me.Discussion:https://postgr.es/m/E061A8E3-5E3D-494D-94F0-E8A9B312BBFC@amazon.com1 parent28ae524 commit7148050
File tree
3 files changed
+28
-7
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+28
-7
lines changedLines changed: 18 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
370 | 370 |
| |
371 | 371 |
| |
372 | 372 |
| |
373 |
| - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
374 | 377 |
| |
375 | 378 |
| |
376 | 379 |
| |
| 380 | + | |
377 | 381 |
| |
378 | 382 |
| |
379 | 383 |
| |
| |||
389 | 393 |
| |
390 | 394 |
| |
391 | 395 |
| |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
392 | 403 |
| |
393 | 404 |
| |
394 | 405 |
| |
| |||
527 | 538 |
| |
528 | 539 |
| |
529 | 540 |
| |
530 |
| - | |
531 |
| - | |
532 |
| - | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
533 | 544 |
| |
534 | 545 |
| |
535 | 546 |
| |
| |||
831 | 842 |
| |
832 | 843 |
| |
833 | 844 |
| |
834 |
| - | |
835 |
| - | |
836 |
| - | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
837 | 848 |
| |
838 | 849 |
| |
839 | 850 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
93 | 98 |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
73 | 73 |
| |
74 | 74 |
| |
75 | 75 |
| |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
76 | 81 |
|
0 commit comments
Comments
(0)