Zmiany pomiędzy wersją 15 and wersją 16 dla AdminGuide/DatabaseMonitoring

Pokaż
Ignoruj:
Data i czas:
02/26/16 11:11:50 (9 years temu)
Autor:
jachtelik (IP: 79.188.124.105)
Komentarz:

--

Legend:

Bez zmian
Dodane
Usunięte
Zmienione
  • AdminGuide/DatabaseMonitoring

    v15 v16  
    3737Od wersji postgresql 9.2: 
    3838{{{ 
    39 postgres@edokumenty:~$psql 
    40  
     39#!sql 
    4140SELECT (now() - pg_stat_activity.xact_start) AS age, 
    4241pg_stat_activity.datname, pg_stat_activity.pid, 
     
    5453 
    5554{{{ 
     55#!sql 
    5656SELECT psut.relname, 
    5757     to_char(psut.last_vacuum, 'YYYY-MM-DD HH24:MI') as last_vacuum, 
     
    7676== Sprawdzenie wielkości tabel == 
    7777{{{ 
     78#!sql 
    7879SELECT pgn.nspname, relname, pg_size_pretty(relpages::bigint * 8 * 1024) AS size 
    7980FROM pg_class pg, pg_namespace pgn  
     
    8485== Rozszerzone informacje == 
    8586{{{ 
     87#!sql 
    8688SELECT pgn.nspname, relname, pg_size_pretty(relpages::bigint * 8 * 1024) AS size,  
    8789CASE 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