Re: [HACKERS] More stats about skipped vacuums

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] More stats about skipped vacuums
Date: 2017-11-28 08:35:50
Message-ID: CABUevEy_KMR4Gez6FEVCFp41-5mehd_wbC+EnAzYWqWZY_eefA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 28, 2017 at 12:16 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Magnus Hagander <magnus(at)hagander(dot)net> writes:
> > What I've been thinking about for that one before is if we could just
> > invent a protocol (shmq based maybe) whereby autovacuum can ask the stats
> > collector for a single table or index stat. If autovacuum never needs to
> > see a consistent view between multiple tables, I would think that's going
> > to be a win in a lot of cases.
>
> Perhaps. Autovac might run through quite a few tables before it finds
> one in need of processing, though, so I'm not quite certain this would
> yield such great benefits in isolation.
>

Hmm. Good point.

> > However, when it comes to the stats system, I'd say that on any busy
> system
> > (which would be the ones to care about), the stats structures are still
> > going to be *written* a lot more than they are read.
>
> Uh, what? The stats collector doesn't write those files at all except
> on-demand.
>

Oops. Missing one important word. They're going to be *written to* a lot
more than they are read. Meaning that each individual value is likely to be
updated many times before it's ever read. In memory, in the stats
collector. So not talking about the files at all -- just the numbers,
independent of implementation.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2017-11-28 08:49:25 Re: [HACKERS] Small improvement to compactify_tuples
Previous Message Aleksander Alekseev 2017-11-28 08:14:19 Re: Transform for pl/perl