Re: Removing vacuum_cleanup_index_scale_factor

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Removing vacuum_cleanup_index_scale_factor
Date: 2021-03-08 21:38:55
Message-ID: 1879837.1615239535@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <pg(at)bowt(dot)ie> writes:
> I think that a simpler approach would work better: When
> ANALYZE/do_analyze_rel() decides whether or not it should call
> vac_update_relstats() for each index, it should simply not care
> whether or not this is a VACUUM ANALYZE (as opposed to a simple
> ANALYZE). This is already what we do for the heap relation itself. Why
> shouldn't we do something similar for indexes?

> What do you think, Tom? Your bugfix commit b4b6923e03f from 2011
> taught do_analyze_rel() to not care about whether VACUUM took place
> earlier in the same command -- though only in the case of the heap
> relation (not in the case of its indexes). That decision now seems a
> bit arbitrary to me.

Well, nobody had complained about the index stats at that point,
so I don't think I was thinking about that aspect of it.

As you say, the history here is a bit convoluted, but it seems like
a good principle to avoid interconnections between VACUUM and ANALYZE
as much as we can. I haven't been paying enough attention to this
thread to have more insight than that.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-03-08 22:12:20 Re: proposal - operators ? and ->> for type record, and functions record_keys and record_each_text
Previous Message Pavel Stehule 2021-03-08 21:29:47 proposal - operators ? and ->> for type record, and functions record_keys and record_each_text