forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9db4598
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 parent14c57cb commit9db4598
1 file changed
+16
-10
lines changedLines changed: 16 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
390 | 390 |
| |
391 | 391 |
| |
392 | 392 |
| |
393 |
| - | |
394 | 393 |
| |
395 | 394 |
| |
396 | 395 |
| |
| |||
522 | 521 |
| |
523 | 522 |
| |
524 | 523 |
| |
525 |
| - | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
526 | 528 |
| |
527 | 529 |
| |
528 | 530 |
| |
529 | 531 |
| |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
530 | 539 |
| |
531 | 540 |
| |
532 | 541 |
| |
| |||
535 | 544 |
| |
536 | 545 |
| |
537 | 546 |
| |
538 |
| - | |
| 547 | + | |
539 | 548 |
| |
540 | 549 |
| |
541 |
| - | |
542 | 550 |
| |
543 | 551 |
| |
544 | 552 |
| |
| |||
551 | 559 |
| |
552 | 560 |
| |
553 | 561 |
| |
554 |
| - | |
| 562 | + | |
555 | 563 |
| |
556 | 564 |
| |
557 | 565 |
| |
558 | 566 |
| |
559 |
| - | |
560 |
| - | |
| 567 | + | |
561 | 568 |
| |
562 | 569 |
| |
563 | 570 |
| |
564 | 571 |
| |
565 | 572 |
| |
566 |
| - | |
| 573 | + | |
567 | 574 |
| |
568 | 575 |
| |
569 | 576 |
| |
570 | 577 |
| |
571 |
| - | |
572 |
| - | |
| 578 | + | |
573 | 579 |
| |
574 | 580 |
| |
575 | 581 |
| |
|
0 commit comments
Comments
(0)