From: | Condor <condor(at)stz-bg(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Vacuum does not show in pg_stat_all_tables |
Date: | 2012-05-15 08:59:21 |
Message-ID: | e20e39e378acf420425e6ff2913ff6b6@stz-bg.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello everyone,
today when I do select relname, last_autovacuum, last_vacuum from
pg_stat_all_tables I see last_vacuum and autovacuum fields is empty.
This its seems strange for me, because every night crontab start at
01:10 am a vacuum script that do:
reindex, vacuum full and vacuum analyze. I run vacuumdb not vacuum from
command line. I use posgresql 9.1.3.
My question is: Is this a bug or may be my vacuum never is completed ?
Here is my vacuum script if some want a look at it.
#!/bin/sh
PSQL="/usr/bin/psql -U postgres my_db -h 10.0.0.1"
su - postgres -c "/usr/bin/vacuumdb --dbname=my_db --host=10.0.0.1 >>
/var/lib/postgres/vacuum.log 2>&1";
# reindex
tables=`$PSQL -t -c "SELECT DISTINCT c.oid::pg_catalog.regclass FROM
pg_catalog.pg_index x JOIN pg_catalog.pg_class c ON c.oid = x.indrelid
JOIN pg_catalog.pg_namespace n O
N c.relnamespace = n.oid WHERE nspname NOT LIKE 'pg_%'"`
for table in $tables; do
$PSQL -c "SET autocommit TO 'on'; REINDEX TABLE $table"
[ "$?" -ne 0 ] && exit 1
done
/usr/bin/vacuumdb --full --dbname=my_db --host=10.0.0.1 >>
/var/lib/postgres/vacuum.log 2>&1
su - postgres -c "/usr/bin/vacuumdb --analyze --dbname=my_db
--host=10.0.0.1 >> /var/lib/postgres/vacuum.log 2>&1"
Any one can tell me why this is happened ?
Regards,
Condor
From | Date | Subject | |
---|---|---|---|
Next Message | chinnaobi | 2012-05-15 09:11:45 | Re: HotStandby --Advice needed |
Previous Message | Sumit Raja | 2012-05-15 08:01:28 | Re: Postgres 9.0 Streaming Replication and Load Balancing? |