pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow can I tell if I'm autovacuuming?
7+ messages / 6 participants
[nested] [flat]
* How can I tell if I'm autovacuuming?
@ 2010-05-22 13:51 Doug Gorley <doug.gorley@gmail.com>
2010-05-22 17:11 ` Re: How can I tell if I'm autovacuuming? Joshua D. Drake <jd@commandprompt.com>
0 siblings, 1 reply; 7+ messages in thread
From: Doug Gorley @ 2010-05-22 13:51 UTC (permalink / raw)
To: pgsql-admin
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How can I tell if I'm autovacuuming?
2010-05-22 13:51 How can I tell if I'm autovacuuming? Doug Gorley <doug.gorley@gmail.com>
@ 2010-05-22 17:11 ` Joshua D. Drake <jd@commandprompt.com>
2010-05-25 12:31 ` Re: How can I tell if I'm autovacuuming? Ireneusz Pluta <ipluta@wp.pl>
2010-05-25 18:40 ` Re: How can I tell if I'm autovacuuming? Mitch Collinsworth <mitch@ccmr.cornell.edu>
0 siblings, 2 replies; 7+ messages in thread
From: Joshua D. Drake @ 2010-05-22 17:11 UTC (permalink / raw)
To: Doug Gorley <doug.gorley@gmail.com>; +Cc: pgsql-admin
On Sat, 2010-05-22 at 09:51 -0400, Doug Gorley wrote:
> From what I see in the docs, these three settings in postgresql.conf
> should be enough for PostgreSQL (8.2) to autovacuum with the default
> settings:
>
> autovacuum = on
> stats_start_collector = on
> stats_row_level = on
>
> So, two questions:
>
> (a) Is this correct? Should autovacuum be functional now?
If you restarted.
> (b) How can I verify that my databases are being vacuumed by autovacuum?
pg_stat_user_tables should have a last_autovac column.
>
> Thanks,
>
> --
> Doug Gorley | doug@gorley.ca
>
>
--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564
Consulting, Training, Support, Custom Development, Engineering
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How can I tell if I'm autovacuuming?
2010-05-22 13:51 How can I tell if I'm autovacuuming? Doug Gorley <doug.gorley@gmail.com>
2010-05-22 17:11 ` Re: How can I tell if I'm autovacuuming? Joshua D. Drake <jd@commandprompt.com>
@ 2010-05-25 12:31 ` Ireneusz Pluta <ipluta@wp.pl>
1 sibling, 0 replies; 7+ messages in thread
From: Ireneusz Pluta @ 2010-05-25 12:31 UTC (permalink / raw)
To: jd@commandprompt.com; +Cc: Doug Gorley <doug.gorley@gmail.com>; pgsql-admin
>> (b) How can I verify that my databases are being vacuumed by autovacuum?
>>
>
> pg_stat_user_tables should have a last_autovac column.
>
Also, you can see autovacuum related messages like:
DEBUG: autovacuum: processing database "postgres"
DEBUG: autovacuum: processing database "template1"
in your server log, by setting log_min_messages to 'debug1' in your
postgresql.conf.
As a side effect you may also see some other messages enabled with the
same debug level,
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How can I tell if I'm autovacuuming?
2010-05-22 13:51 How can I tell if I'm autovacuuming? Doug Gorley <doug.gorley@gmail.com>
2010-05-22 17:11 ` Re: How can I tell if I'm autovacuuming? Joshua D. Drake <jd@commandprompt.com>
@ 2010-05-25 18:40 ` Mitch Collinsworth <mitch@ccmr.cornell.edu>
2010-05-25 18:59 ` Re: How can I tell if I'm autovacuuming? Alvaro Herrera <alvherre@alvh.no-ip.org>
1 sibling, 1 reply; 7+ messages in thread
From: Mitch Collinsworth @ 2010-05-25 18:40 UTC (permalink / raw)
To: Joshua D. Drake <jd@commandprompt.com>; +Cc: Doug Gorley <doug.gorley@gmail.com>; pgsql-admin
On Sat, 22 May 2010, Joshua D. Drake wrote:
> On Sat, 2010-05-22 at 09:51 -0400, Doug Gorley wrote:
>> From what I see in the docs, these three settings in postgresql.conf
>> should be enough for PostgreSQL (8.2) to autovacuum with the default
>> settings:
>>
>> autovacuum = on
>> stats_start_collector = on
>> stats_row_level = on
>>
>> So, two questions:
>>
>> (a) Is this correct? Should autovacuum be functional now?
>
> If you restarted.
>
>> (b) How can I verify that my databases are being vacuumed by autovacuum?
>
> pg_stat_user_tables should have a last_autovac column.
I'm wondering about the same question. I did the above and restarted,
and now my pg_stat_user_tables looks like this:
postgres=# \d pg_stat_user_tables
View "pg_catalog.pg_stat_user_tables"
Column | Type | Modifiers
---------------+--------+-----------
relid | oid |
schemaname | name |
relname | name |
seq_scan | bigint |
seq_tup_read | bigint |
idx_scan | bigint |
idx_tup_fetch | bigint |
n_tup_ins | bigint |
n_tup_upd | bigint |
n_tup_del | bigint |
View definition:
SELECT pg_stat_all_tables.relid, pg_stat_all_tables.schemaname, pg_stat_all_tables.relname, pg_stat_all_tables.seq_scan, pg_stat_all_tables.seq_tup_read, pg_stat_all_tables.idx_scan, pg_stat_all_tables.idx_tup_fetch, pg_stat_all_tables.n_tup_ins, pg_stat_all_tables.n_tup_upd, pg_stat_all_tables.n_tup_del
FROM pg_stat_all_tables
WHERE pg_stat_all_tables.schemaname <> 'pg_catalog'::name AND pg_stat_all_tables.schemaname <> 'pg_toast'::name AND pg_stat_all_tables.schemaname <> 'information_schema'::name;
I don't see a last_autovac column, but I also don't see it in the
View definition.
So is this saying:
a) autovacuum is not running?
b) Something needs to update the view definition?
c) I need to wait [insert some period of time or number of transactions]
before autovacuum runs and something updates the view definition?
d) none of the above?
-Mitch
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How can I tell if I'm autovacuuming?
2010-05-22 13:51 How can I tell if I'm autovacuuming? Doug Gorley <doug.gorley@gmail.com>
2010-05-22 17:11 ` Re: How can I tell if I'm autovacuuming? Joshua D. Drake <jd@commandprompt.com>
2010-05-25 18:40 ` Re: How can I tell if I'm autovacuuming? Mitch Collinsworth <mitch@ccmr.cornell.edu>
@ 2010-05-25 18:59 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2010-05-25 19:38 ` Re: How can I tell if I'm autovacuuming? Mitch Collinsworth <mitch@ccmr.cornell.edu>
0 siblings, 1 reply; 7+ messages in thread
From: Alvaro Herrera @ 2010-05-25 18:59 UTC (permalink / raw)
To: Mitch Collinsworth <mitch@ccmr.cornell.edu>; +Cc: Joshua D. Drake <jd@commandprompt.com>; Doug Gorley <doug.gorley@gmail.com>; pgsql-admin
Excerpts from Mitch Collinsworth's message of mar may 25 14:40:04 -0400 2010:
> I'm wondering about the same question. I did the above and restarted,
> and now my pg_stat_user_tables looks like this:
>
> postgres=# \d pg_stat_user_tables
> View "pg_catalog.pg_stat_user_tables"
> Column | Type | Modifiers
> ---------------+--------+-----------
> relid | oid |
> schemaname | name |
> relname | name |
> seq_scan | bigint |
> seq_tup_read | bigint |
> idx_scan | bigint |
> idx_tup_fetch | bigint |
> n_tup_ins | bigint |
> n_tup_upd | bigint |
> n_tup_del | bigint |
I'd say you're running 8.1, not 8.2 as initially stated.
--
Álvaro Herrera <alvherre@alvh.no-ip.org>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How can I tell if I'm autovacuuming?
2010-05-22 13:51 How can I tell if I'm autovacuuming? Doug Gorley <doug.gorley@gmail.com>
2010-05-22 17:11 ` Re: How can I tell if I'm autovacuuming? Joshua D. Drake <jd@commandprompt.com>
2010-05-25 18:40 ` Re: How can I tell if I'm autovacuuming? Mitch Collinsworth <mitch@ccmr.cornell.edu>
2010-05-25 18:59 ` Re: How can I tell if I'm autovacuuming? Alvaro Herrera <alvherre@alvh.no-ip.org>
@ 2010-05-25 19:38 ` Mitch Collinsworth <mitch@ccmr.cornell.edu>
2010-05-25 19:53 ` Re: How can I tell if I'm autovacuuming? Alvaro Herrera <alvherre@commandprompt.com>
0 siblings, 1 reply; 7+ messages in thread
From: Mitch Collinsworth @ 2010-05-25 19:38 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: Joshua D. Drake <jd@commandprompt.com>; Doug Gorley <doug.gorley@gmail.com>; pgsql-admin
On Tue, 25 May 2010, Alvaro Herrera wrote:
> Excerpts from Mitch Collinsworth's message of mar may 25 14:40:04 -0400 2010:
>
>> I'm wondering about the same question. I did the above and restarted,
>> and now my pg_stat_user_tables looks like this:
>>
>> postgres=# \d pg_stat_user_tables
>> View "pg_catalog.pg_stat_user_tables"
>> Column | Type | Modifiers
>> ---------------+--------+-----------
>> relid | oid |
>> schemaname | name |
>> relname | name |
>> seq_scan | bigint |
>> seq_tup_read | bigint |
>> idx_scan | bigint |
>> idx_tup_fetch | bigint |
>> n_tup_ins | bigint |
>> n_tup_upd | bigint |
>> n_tup_del | bigint |
>
> I'd say you're running 8.1, not 8.2 as initially stated.
Well... yes. Sorry. I take it the answer is different then...
So... How can I tell if I'm autovacuuming in 8.1.21?
-Mitch
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How can I tell if I'm autovacuuming?
2010-05-22 13:51 How can I tell if I'm autovacuuming? Doug Gorley <doug.gorley@gmail.com>
2010-05-22 17:11 ` Re: How can I tell if I'm autovacuuming? Joshua D. Drake <jd@commandprompt.com>
2010-05-25 18:40 ` Re: How can I tell if I'm autovacuuming? Mitch Collinsworth <mitch@ccmr.cornell.edu>
2010-05-25 18:59 ` Re: How can I tell if I'm autovacuuming? Alvaro Herrera <alvherre@alvh.no-ip.org>
2010-05-25 19:38 ` Re: How can I tell if I'm autovacuuming? Mitch Collinsworth <mitch@ccmr.cornell.edu>
@ 2010-05-25 19:53 ` Alvaro Herrera <alvherre@commandprompt.com>
0 siblings, 0 replies; 7+ messages in thread
From: Alvaro Herrera @ 2010-05-25 19:53 UTC (permalink / raw)
To: Mitch Collinsworth <mitch@ccmr.cornell.edu>; +Cc: Joshua D. Drake <jd@commandprompt.com>; Doug Gorley <doug.gorley@gmail.com>; pgsql-admin
Excerpts from Mitch Collinsworth's message of mar may 25 15:38:38 -0400 2010:
> On Tue, 25 May 2010, Alvaro Herrera wrote:
> > I'd say you're running 8.1, not 8.2 as initially stated.
>
> Well... yes. Sorry. I take it the answer is different then...
>
> So... How can I tell if I'm autovacuuming in 8.1.21?
Crank log_min_messages down to debug2 and check the log for DEBUG
messages talking about databases and tables processed by autovacuum.
(I think debug1 produces enough data, I can't recall precisely).
8.1 was the first release to sport integrated autovacuum. It was very
rough around the edges. If you're depending on its behavior, I suggest
you upgrade.
--
Álvaro Herrera <alvherre@commandprompt.com>
Command Prompt, Inc. -- The PostgreSQL Company
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2010-05-25 19:53 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-05-22 13:51 How can I tell if I'm autovacuuming? Doug Gorley <doug.gorley@gmail.com>
2010-05-22 17:11 ` Joshua D. Drake <jd@commandprompt.com>
2010-05-25 12:31 ` Ireneusz Pluta <ipluta@wp.pl>
2010-05-25 18:40 ` Mitch Collinsworth <mitch@ccmr.cornell.edu>
2010-05-25 18:59 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2010-05-25 19:38 ` Mitch Collinsworth <mitch@ccmr.cornell.edu>
2010-05-25 19:53 ` Alvaro Herrera <alvherre@commandprompt.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox