From: Tomas Vondra <tv@fuzzy.cz>
To: pgsql-hackers@postgresql.org
Subject: Re: autovacuum stress-testing our system
Date: Mon, 19 Nov 2012 00:13:21 +0100
Message-ID: <50A96B91.1050409@fuzzy.cz> (raw)
In-Reply-To: <26698.1348676957@sss.pgh.pa.us>
References: <1718942738eb65c8407fcd864883f4c8@fuzzy.cz>
<506316E7.7060303@timbira.com>
<1348673153-sup-4361@alvh.no-ip.org>
<26698.1348676957@sss.pgh.pa.us>
On 26.9.2012 18:29, Tom Lane wrote:
> What seems to me like it could help more is fixing things so that the
> autovac launcher needn't even launch a child process for databases that
> haven't had any updates lately. I'm not sure how to do that, but it
> probably involves getting the stats collector to produce some kind of
> summary file.
Couldn't we use the PgStat_StatDBEntry for this? By splitting the
pgstat.stat file into multiple pieces (see my other post in this thread)
there's a file with StatDBEntry items only, so maybe it could be used as
the summary file ...
I've been thinking about this:
(a) add "needs_autovacuuming" flag to PgStat_(TableEntry|StatDBEntry)
(b) when table stats are updated, run quick check to decide whether
the table needs to be processed by autovacuum (vacuumed or
analyzed), and if yes then set needs_autovacuuming=true and both
for table and database
The worker may read the DB entries from the file and act only on those
that need to be processed (those with needs_autovacuuming=true).
Maybe the DB-level field might be a counter of tables that need to be
processed, and the autovacuum daemon might act on those first? Although
the simpler the better I guess.
Or did you mean something else?
regards
Tomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tv@fuzzy.cz
Subject: Re: autovacuum stress-testing our system
In-Reply-To: <50A96B91.1050409@fuzzy.cz>
References: <1718942738eb65c8407fcd864883f4c8@fuzzy.cz> <506316E7.7060303@timbira.com> <1348673153-sup-4361@alvh.no-ip.org> <26698.1348676957@sss.pgh.pa.us> <50A96B91.1050409@fuzzy.cz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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