Skip site navigation (1) Skip section navigation (2)

BUG #5722: vacuum full does not update last_vacuum statistics

From: "Jochen Erwied" <jochen(at)pgsql(dot)erwied(dot)eu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5722: vacuum full does not update last_vacuum statistics
Date: 2010-10-25 12:42:24
Message-ID: 201010251242.o9PCgO10001534@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      5722
Logged by:          Jochen Erwied
Email address:      jochen(at)pgsql(dot)erwied(dot)eu
PostgreSQL version: 9.0.1
Operating system:   x86_64-pc-linux-gnu
Description:        vacuum full does not update last_vacuum statistics
Details: 

VACUUM FULL does not update statistics so display of pg_stat_user_tables is
wrong. A normal VACUUM updates the relevant information.

Example on a live database:

smtpscan=# select * from pg_stat_all_tables where
relname='servers_part_226';
-[ RECORD 1 ]----+------------------------------
relid            | 30559
schemaname       | public
relname          | servers_part_226
seq_scan         | 38
seq_tup_read     | 38
idx_scan         | 0
idx_tup_fetch    | 0
n_tup_ins        | 1
n_tup_upd        | 0
n_tup_del        | 0
n_tup_hot_upd    | 0
n_live_tup       | 1
n_dead_tup       | 0
last_vacuum      |
last_autovacuum  |
last_analyze     | 2010-10-25 14:17:20.013568+02
last_autoanalyze |

smtpscan=# vacuum full servers_part_226;
VACUUM
smtpscan=# select * from pg_stat_all_tables where
relname='servers_part_226';
-[ RECORD 1 ]----+------------------------------
relid            | 30559
schemaname       | public
relname          | servers_part_226
seq_scan         | 42
seq_tup_read     | 42
idx_scan         | 0
idx_tup_fetch    | 0
n_tup_ins        | 1
n_tup_upd        | 0
n_tup_del        | 0
n_tup_hot_upd    | 0
n_live_tup       | 1
n_dead_tup       | 0
last_vacuum      |
last_autovacuum  |
last_analyze     | 2010-10-25 14:17:20.013568+02
last_autoanalyze |

smtpscan=# vacuum servers_part_226;
VACUUM
smtpscan=# select * from pg_stat_all_tables where
relname='servers_part_226';
-[ RECORD 1 ]----+------------------------------
relid            | 30559
schemaname       | public
relname          | servers_part_226
seq_scan         | 42
seq_tup_read     | 42
idx_scan         | 0
idx_tup_fetch    | 0
n_tup_ins        | 1
n_tup_upd        | 0
n_tup_del        | 0
n_tup_hot_upd    | 0
n_live_tup       | 1
n_dead_tup       | 0
last_vacuum      | 2010-10-25 14:41:18.67515+02
last_autovacuum  |
last_analyze     | 2010-10-25 14:17:20.013568+02
last_autoanalyze |

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2010-10-25 14:12:39
Subject: Re: BUG #5722: vacuum full does not update last_vacuum statistics
Previous:From: Heikki LinnakangasDate: 2010-10-25 11:44:37
Subject: Re: Recovery bug

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group