Products | Versions |
---|---|
TIBCO Data Virtualization | 7.0.0 and later |
•VACUUM reclaims storage occupied by dead tuples. In normal PostgreSQL operation, tuples that are deleted or obsoleted by an update are not physically removed from their table; they remain present until a VACUUM is done. Therefore it's necessary to do VACUUM periodically, especially on frequently-updated tables.
• With no parameter, VACUUM processes every table in the current database that the current user has permission to vacuum. With a parameter, VACUUM processes only that table.
•VACUUM ANALYZE performs a VACUUM and then an ANALYZE for each selected table. This is a handy combination form for routine maintenance scripts. See ANALYZE for more details about its processing.
Note: $REPOSITORY_PORT can be found in server_values.xml( search for database/databasePort).
$REPOSITORY_NAME is usually 'cis070001' or 'cisrepo', the name also can be found in server_values.xml (search for database/databaseSchema).
$USER_NAME is the os user that was used to install the CIS Server.
2) Execute this command to find the size of the tables on diskSELECT nspname || '.' || relname AS "relation",
pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE nspname NOT IN ('pg_catalog', 'information_schema')
AND C.relkind <> 'i'
AND nspname !~ '^pg_toast'
ORDER BY pg_total_relation_size(C.oid) DESC
LIMIT 20;
3) Stop CIS using $INSTALL_DIR/bin/composite.(sh or bat)
4) Stop the repository using command $INSTALL_DIR/bin/composite.sh repo stop
5) Change the settings to roll the repository logs (before this fix the cs_repository.log would grow infinitely)
6) Open $INSTALL_DIR/repository/data/postgres.conf
7) Change log_filename = 'cs_repository-%a.log'
8) enable log_truncate_on_rotation = on
SELECT nspname || '.' || relname AS "relation",
pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE nspname NOT IN ('pg_catalog', 'information_schema')
AND C.relkind <> 'i'
AND nspname !~ '^pg_toast'
ORDER BY pg_total_relation_size(C.oid) DESC
LIMIT 20;