본문 바로가기

PostgreSQL/Postgresql 9.4

9.4에 추가 되는 Statistics Collector VIEW pg_stat_archiver

9.4에 추가 되는 Statistics Collector VIEW 

Table 27-3. pg_stat_archiver View

ColumnTypeDescription
archived_countbigintNumber of WAL files that have been successfully archived
last_archived_waltextName of the last WAL file successfully archived
last_archived_timetimestamp with time zoneTime of the last successful archive operation
failed_countbigintNumber of failed attempts for archiving WAL files
last_failed_waltextName of the WAL file of the last failed archival operation
last_failed_timetimestamp with time zoneTime of the last failed archival operation
stats_resettimestamp with time zoneTime at which these statistics were last reset

The pg_stat_archiver view will always have a single row, containing data about the archiver process of the cluster.


postgres=# select * from pg_stat_archiver ;

-[ RECORD 1 ]------+------------------------------

 archived_count     | 167

 last_archived_wal  | 00000001000000000000009B

 last_archived_time | 2014-05-02 20:42:36.230998-07

 failed_count       | 75

 last_failed_wal    | 000000010000000000000012

 last_failed_time   | 2014-05-01 12:09:57.087644-07

 stats_reset        | 2014-04-30 19:02:01.288521-07