aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/dbsize.c
Commit message (Collapse)AuthorAge
...
* Relax permissions checks on dbsize functions, per discussion. Revert out allTom Lane2007-08-29
| | | | | | | | | | checks for individual-table-size functions, since anyone in the database could get approximate values from pg_class.relpages anyway. Allow database-size to users with CONNECT privilege for the target database (note that this is granted by default). Allow tablespace-size if the user has CREATE privilege on the tablespace (which is *not* granted by default), or if the tablespace is the default tablespace for the current database (since we treat that as implicitly allowing use of the tablespace).
* Restrict pg_relation_size to relation owner, pg_database_size to DB owner,Tom Lane2007-08-27
| | | | | | and pg_tablespace_size to superusers. Perhaps we could weaken the first case to just require SELECT privilege, but that doesn't work for the other cases, so use ownership as the common concept.
* Fix a race condition that caused pg_database_size() and pg_tablespace_size()Alvaro Herrera2007-03-11
| | | | | | | | | to fail if an object was removed between calls to ReadDir() and stat(). Per discussion in pgsql-hackers. http://archives.postgresql.org/pgsql-hackers/2007-03/msg00671.php Bug report and patch by Michael Fuhr.
* Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len).Tom Lane2007-02-27
| | | | | | | | | | | Get rid of VARATT_SIZE and VARATT_DATA, which were simply redundant with VARSIZE and VARDATA, and as a consequence almost no code was using the longer names. Rename the length fields of struct varlena and various derived structures to catch anyplace that was accessing them directly; and clean up various places so caught. In itself this patch doesn't change any behavior at all, but it is necessary infrastructure if we hope to play any games with the representation of varlena headers. Greg Stark and Tom Lane
* Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian2007-01-05
| | | | back-stamped for this.
* Get rid of some unnecessary dependencies on DataDir: wherever possible,Tom Lane2006-11-06
| | | | | the backend should rely on its working-directory setting instead. Also do some message-style police work in contrib/adminpack.
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-05
|
* Message correctionsPeter Eisentraut2005-10-29
|
* Standard pgindent run for 8.1.Bruce Momjian2005-10-15
|
* Fix confusion between relfilenode and Oid.Alvaro Herrera2005-09-29
| | | | | Also, make pg_total_relation_size include the size of the TOAST index.
* Rename pg_complete_relation_size() to pg_total_relation_size(), for theNeil Conway2005-09-16
| | | | | | | | | | | | | | sake of brevity and clarity. Make pg_reload_conf(), pg_rotate_logfile(), and pg_cancel_backend() return a boolean rather than an integer to indicate success or failure. Along the way, make some minor cleanups to dbsize.c -- in particular, use elog() rather than ereport() for "shouldn't happen" error conditions, and remove some of the more flagrant violations of the Postgres indentation conventions. Catalog version bumped.
* Use ReadDir() not readdir() so as to have some modicum of error checking.Tom Lane2005-08-02
|
* Un-Windows-ify newlines.Tom Lane2005-08-02
|
* Move dbsize functions into the backend. New functions:Bruce Momjian2005-07-29
pg_tablespace_size pg_database_size pg_relation_size pg_complete_relation_size pg_size_pretty Remove /contrib/dbsize. Dave Page