From: | Benedikt Grundmann <bgrundmann(at)janestreet(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | How to introspect autovacuum analyze settings |
Date: | 2016-11-21 13:44:39 |
Message-ID: | CADbMkNPwk3N4JGY+jo6vpK1tqfusvjpCKUD_sj6rS6_s5395ww@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello all,
I have a quick question. I feel like somewhere in section 23.1.6 there
should be the answer but I couldn't find it yet. Namely how can I query
the database for total number of tuples inserted, updated, or deleted since
the last ANALYZE? pg_stat_user_tables.n_tup_{ins,upd,del,hot_upd} seems to
not reset after an analyze[1]. But clearly the database has that knowledge
somewhere persistent because otherwise how could autovacuum do its thing.
Rationale for the question. I have the strong suspicion that for some of
our bigger tables autovacuum *analyze *is not hitting frequently enough
(even so we already much more aggressive settings than the default). So I
want to set some custom settings for those tables. But rather than doing
it manually for the one table I found I would much rather write a query
(ideally one taking any existing per table settings into account) that
tells me likely candidates for tweaking. But so far I fail to even get the
relevant data.
Cheers,
Bene
[1] At least it didn't when I just run analyze on a table explicitly.
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2016-11-21 14:51:32 | Re: How to introspect autovacuum analyze settings |
Previous Message | Mark Anns | 2016-11-21 13:15:17 | Re: How the Planner in PGStrom differs from PostgreSQL? |