From: Mark Dilger <hornschnorter@gmail.com>
To: David Fetter <david@fetter.org>
Cc: PostgreSQL Development <pgsql-hackers@postgresql.org>
Cc: Christophe Pettus <xof@thebuild.com>
Subject: Re: Make autovacuum sort tables in descending order of xid_age
Date: Thu, 12 Dec 2019 13:47:23 -0800
Message-ID: <49dac8e3-40bc-2986-e873-51f874c0f5fa@gmail.com> (raw)
In-Reply-To: <2ad2a9fa-32eb-29aa-07ee-f0fe75ad4db5@gmail.com>
References: <20191129180138.GD8731@fetter.org>
<20191129222152.GE8731@fetter.org>
<2488acea-328b-1328-d437-8c156bc8f7a4@gmail.com>
<20191130222314.GF8731@fetter.org>
<877ac074-e95d-bdee-09e7-c51f0ee0fde2@gmail.com>
<20191212192631.GA29201@fetter.org>
<2ad2a9fa-32eb-29aa-07ee-f0fe75ad4db5@gmail.com>
On 12/12/19 1:35 PM, Mark Dilger wrote:
> Let C = 1.00000002065
> Let x = xid_age for a table
> Let v = clamp(n_dead_tuples / reltuples*2) to max 0.5
> Let a = clamp(changes_since_analyze / reltuples) to max 0.5
>
> Let score = C**x + v + a
I should hasten to add that this is just a proof of concept
formula, not one that I'm specifically advocating. The point
is that we can devise a scoring system in which the xid age
is the dominant factor whenever it could possibly matter,
while still letting other factors prevail when xid age is
of little consequence.
--
Mark Dilger
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: hornschnorter@gmail.com, david@fetter.org, xof@thebuild.com
Subject: Re: Make autovacuum sort tables in descending order of xid_age
In-Reply-To: <49dac8e3-40bc-2986-e873-51f874c0f5fa@gmail.com>
* 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