forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit74eaa05
committed
vacuumdb: Skip temporary tables in query to build list of relations
Running vacuumdb with a non-superuser while another user has created atemporary table would lead to a mid-flight permission failure,interrupting the operation. vacuum_rel() skips temporary relations ofother backends, and it makes no sense for vacuumdb to know about theserelations, so let's switch it to ignore temporary relations entirely.Adding a qual in the query based on relpersistence simplifies thegeneration of its WHERE clause in vacuum_one_database(), per se theremoval of "has_where".Author: VaibhaveS, Michael PaquierReviewed-by: Fujii MasaoDiscussion:https://postgr.es/m/CAM_eQjwfAR=y3G1fGyS1U9FTmc+FyJm9amNfY2QCZBnDDbNPZg@mail.gmail.comBackpatch-through: 121 parent0cf3d41 commit74eaa05
1 file changed
+16
-10
lines changedLines changed: 16 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
401 | 401 |
| |
402 | 402 |
| |
403 | 403 |
| |
404 |
| - | |
405 | 404 |
| |
406 | 405 |
| |
407 | 406 |
| |
| |||
551 | 550 |
| |
552 | 551 |
| |
553 | 552 |
| |
554 |
| - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
555 | 557 |
| |
556 | 558 |
| |
557 | 559 |
| |
558 | 560 |
| |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
559 | 568 |
| |
560 | 569 |
| |
561 | 570 |
| |
| |||
564 | 573 |
| |
565 | 574 |
| |
566 | 575 |
| |
567 |
| - | |
| 576 | + | |
568 | 577 |
| |
569 | 578 |
| |
570 |
| - | |
571 | 579 |
| |
572 | 580 |
| |
573 | 581 |
| |
| |||
580 | 588 |
| |
581 | 589 |
| |
582 | 590 |
| |
583 |
| - | |
| 591 | + | |
584 | 592 |
| |
585 | 593 |
| |
586 | 594 |
| |
587 | 595 |
| |
588 |
| - | |
589 |
| - | |
| 596 | + | |
590 | 597 |
| |
591 | 598 |
| |
592 | 599 |
| |
593 | 600 |
| |
594 | 601 |
| |
595 |
| - | |
| 602 | + | |
596 | 603 |
| |
597 | 604 |
| |
598 | 605 |
| |
599 | 606 |
| |
600 |
| - | |
601 |
| - | |
| 607 | + | |
602 | 608 |
| |
603 | 609 |
| |
604 | 610 |
| |
|
0 commit comments
Comments
(0)