Zmiany pomiędzy wersją 15 and wersją 16 dla AdminGuide/DatabaseMonitoring
- Data i czas:
- 02/26/16 11:11:50 (9 years temu)
Legend:
- Bez zmian
- Dodane
- Usunięte
- Zmienione
-
AdminGuide/DatabaseMonitoring
v15 v16 37 37 Od wersji postgresql 9.2: 38 38 {{{ 39 postgres@edokumenty:~$psql 40 39 #!sql 41 40 SELECT (now() - pg_stat_activity.xact_start) AS age, 42 41 pg_stat_activity.datname, pg_stat_activity.pid, … … 54 53 55 54 {{{ 55 #!sql 56 56 SELECT psut.relname, 57 57 to_char(psut.last_vacuum, 'YYYY-MM-DD HH24:MI') as last_vacuum, … … 76 76 == Sprawdzenie wielkości tabel == 77 77 {{{ 78 #!sql 78 79 SELECT pgn.nspname, relname, pg_size_pretty(relpages::bigint * 8 * 1024) AS size 79 80 FROM pg_class pg, pg_namespace pgn … … 84 85 == Rozszerzone informacje == 85 86 {{{ 87 #!sql 86 88 SELECT pgn.nspname, relname, pg_size_pretty(relpages::bigint * 8 * 1024) AS size, 87 89 CASE WHEN relkind = 't' THEN (SELECT pgd.relname FROM pg_class pgd WHERE pgd.reltoastrelid = pg.oid) WHEN nspname = 'pg_toast' AND relkind = 'i' THEN (SELECT pgt.relname FROM pg_class pgt WHERE SUBSTRING(pgt.relname FROM 10) = REPLACE(SUBSTRING(pg.relname FROM 10), '_index', '')) ELSE (SELECT pgc.relname FROM pg_class pgc WHERE pg.reltoastrelid = pgc.oid) END::varchar AS refrelname, CASE WHEN nspname = 'pg_toast' AND relkind = 'i' THEN (SELECT pgts.relname FROM pg_class pgts WHERE pgts.reltoastrelid = (SELECT pgt.oid FROM pg_class pgt WHERE SUBSTRING(pgt.relname FROM 10) = REPLACE(SUBSTRING(pg.relname FROM 10), '_index', ''))) END AS relidxrefrelname, relfilenode, relkind, reltuples::bigint, relpages