Commit 9cd92d1
committed
Add pg_ls_tmpdir function
This lists the contents of a temporary directory associated to a given
tablespace, useful to get information about on-disk consumption caused
by temporary files used by a session query. By default, pg_default is
scanned, and a tablespace can be specified as argument.
This function is intended to be used by monitoring tools, and, unlike
pg_ls_dir(), access to them can be granted to non-superusers so that
those monitoring tools can observe the principle of least privilege.
Access is also given by default to members of pg_monitor.
Author: Nathan Bossart
Reviewed-by: Laurenz Albe
Discussion: https://postgr.es/m/92F458A2-6459-44B8-A7F2-2ADD3225046A@amazon.com1 parent d73f4c7 commit 9cd92d1
File tree
5 files changed
+97
-8
lines changed- doc/src/sgml
- src
- backend
- catalog
- utils/adt
- include/catalog
5 files changed
+97
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20355 | 20355 | | |
20356 | 20356 | | |
20357 | 20357 | | |
| 20358 | + | |
| 20359 | + | |
| 20360 | + | |
| 20361 | + | |
| 20362 | + | |
| 20363 | + | |
| 20364 | + | |
| 20365 | + | |
| 20366 | + | |
| 20367 | + | |
| 20368 | + | |
| 20369 | + | |
| 20370 | + | |
| 20371 | + | |
20358 | 20372 | | |
20359 | 20373 | | |
20360 | 20374 | | |
| |||
20428 | 20442 | | |
20429 | 20443 | | |
20430 | 20444 | | |
| 20445 | + | |
| 20446 | + | |
| 20447 | + | |
| 20448 | + | |
| 20449 | + | |
| 20450 | + | |
| 20451 | + | |
| 20452 | + | |
| 20453 | + | |
| 20454 | + | |
| 20455 | + | |
| 20456 | + | |
| 20457 | + | |
20431 | 20458 | | |
20432 | 20459 | | |
20433 | 20460 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1150 | 1150 | | |
1151 | 1151 | | |
1152 | 1152 | | |
| 1153 | + | |
| 1154 | + | |
1153 | 1155 | | |
1154 | 1156 | | |
1155 | 1157 | | |
| |||
1170 | 1172 | | |
1171 | 1173 | | |
1172 | 1174 | | |
| 1175 | + | |
| 1176 | + | |
1173 | 1177 | | |
1174 | 1178 | | |
1175 | 1179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
520 | 522 | | |
521 | 523 | | |
522 | 524 | | |
523 | | - | |
| 525 | + | |
524 | 526 | | |
525 | 527 | | |
526 | 528 | | |
| |||
549 | 551 | | |
550 | 552 | | |
551 | 553 | | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
556 | 566 | | |
557 | 567 | | |
558 | 568 | | |
| |||
601 | 611 | | |
602 | 612 | | |
603 | 613 | | |
604 | | - | |
| 614 | + | |
605 | 615 | | |
606 | 616 | | |
607 | 617 | | |
608 | 618 | | |
609 | 619 | | |
610 | 620 | | |
611 | | - | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
612 | 660 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10199 | 10199 | | |
10200 | 10200 | | |
10201 | 10201 | | |
| 10202 | + | |
| 10203 | + | |
| 10204 | + | |
| 10205 | + | |
| 10206 | + | |
| 10207 | + | |
| 10208 | + | |
| 10209 | + | |
| 10210 | + | |
| 10211 | + | |
10202 | 10212 | | |
10203 | 10213 | | |
10204 | 10214 | | |
| |||
0 commit comments