mirror of https://github.com/postgres/postgres
7a57a67278
and FreeDir routines modeled on the existing AllocateFile/FreeFile. Like the latter, these routines will avoid failing on EMFILE/ENFILE conditions whenever possible, and will prevent leakage of directory descriptors if an elog() occurs while one is open. Also, reduce PANIC to ERROR in MoveOfflineLogs() --- this is not critical code and there is no reason to force a DB restart on failure. All per recent trouble report from Olivier Hubaut. |
||
---|---|---|
.. | ||
Makefile | ||
README.dbsize | ||
dbsize.c | ||
dbsize.sql.in |
README.dbsize
This module contains two functions that report the size of a given database or relation. E.g., SELECT database_size('template1'); SELECT relation_size('pg_class'); These functions report the actual file system space. Thus, users can avoid digging through the details of the database directories. Copy this directory to contrib/dbsize in your PostgreSQL source tree. Then just run make; make install. Finally, load the functions into any database using dbsize.sql. When computing the size of a table, it does not include TOAST or index disk space.