BUG #5722: vacuum full does not update last_vacuum statistics - Mailing list pgsql-bugs

From Jochen Erwied
Subject BUG #5722: vacuum full does not update last_vacuum statistics
Date
Msg-id 201010251242.o9PCgO10001534@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5722: vacuum full does not update last_vacuum statistics  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5722
Logged by:          Jochen Erwied
Email address:      jochen@pgsql.erwied.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 |

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Recovery bug
Next
From: Tom Lane
Date:
Subject: Re: BUG #5722: vacuum full does not update last_vacuum statistics