b0f5086e41
bitmap, if present). Per Tom Lane's suggestion the information whether a tuple has an oid or not is carried in the tuple descriptor. For debugging reasons tdhasoid is of type char, not bool. There are predefined values for WITHOID, WITHOUTOID and UNDEFOID. This patch has been generated against a cvs snapshot from last week and I don't expect it to apply cleanly to current sources. While I post it here for public review, I'm working on a new version against a current snapshot. (There's been heavy activity recently; hope to catch up some day ...) This is a long patch; if it is too hard to swallow, I can provide it in smaller pieces: Part 1: Accessor macros Part 2: tdhasoid in TupDesc Part 3: Regression test Part 4: Parameter withoid to heap_addheader Part 5: Eliminate t_oid from HeapTupleHeader Part 2 is the most hairy part because of changes in the executor and even in the parser; the other parts are straightforward. Up to part 4 the patched postmaster stays binary compatible to databases created with an unpatched version. Part 5 is small (100 lines) and finally breaks compatibility. Manfred Koizar |
||
---|---|---|
.. | ||
dbsize.c | ||
dbsize.sql.in | ||
Makefile | ||
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.