From: rihad <rihad@mail.ru>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general General <pgsql-general@postgresql.org>
Subject: Re: When do vacuumed pages/tuples become available for reuse?
Date: Thu, 11 Apr 2019 19:14:06 +0400
Message-ID: <116d6b82-5bfc-ad43-6aab-d165b4b7da85@mail.ru> (raw)
In-Reply-To: <20190411150423.GA7441@alvherre.pgsql>
References: <20190411150423.GA7441@alvherre.pgsql>
On 04/11/2019 07:04 PM, Alvaro Herrera wrote:
> On 2019-Apr-11, rihad wrote:
>
>> On 04/11/2019 06:41 PM, Alvaro Herrera wrote:
>>
>>> Perhaps it'd be better to vacuum this table much more often.
>>>
>> Each run took 5-6 hours, now it takes 2-3 hours after I've tweaked some
>> cost-based vacuum knobs.
> But how often does it run?
>
One after another. Enough n_dead_tuples accumulate in between runs to
easily trigger that.
autovacuum_vacuum_scale_factor = 0.01
utovacuum_vacuum_threshold = 50
which means to run autovac when 1% of table size + 50 rows have been
updated or deleted.
But we can't make each autovacuum run run faster )
Currently I lowered this from 20ms:
autovacuum_vacuum_cost_delay = 10ms
And increased this from 200:
autovacuum_vacuum_cost_limit = 400
to make it finish in 1 hour rather than 3 hours.
Anything more than that and we risk impacting the performance of user
queries.
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-general@postgresql.org
Cc: rihad@mail.ru, alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us
Subject: Re: When do vacuumed pages/tuples become available for reuse?
In-Reply-To: <116d6b82-5bfc-ad43-6aab-d165b4b7da85@mail.ru>
References: <20190411150423.GA7441@alvherre.pgsql> <116d6b82-5bfc-ad43-6aab-d165b4b7da85@mail.ru>
* 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