Re: Performance degradation of REFRESH MATERIALIZED VIEW

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Andres Freund <andres@anarazel.de>, Masahiko Sawada <sawada.mshk@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Pavan Deolasee <pavan.deolasee@gmail.com>, Anastasia Lubennikova <a.lubennikova@postgrespro.ru>, Jeff Janes <jeff.janes@gmail.com>, Paul Guo <guopa@vmware.com>
Date: 2021-05-11T07:37:13Z
Lists: pgsql-hackers
On Wed, May 05, 2021 at 03:04:53PM +0200, Tomas Vondra wrote:
> Thanks, that looks promising. I repeated the tests I did on 26/4, and the
> results look like this:
> 
> old (0c7d3bb99): 497ms
> master:          621ms
> patched:         531ms
> 
> So yeah, that's a bit improvement - it does not remove the regression
> entirely, but +5% is much better than +25%.

Hmm.  Is that really something we should do after feature freeze?  A
25% degradation for matview refresh may be a problem for a lot of
users and could be an upgrade stopper.  Another thing we could do is
also to revert 7db0cd2 and 39b66a9 from the v14 tree, and work on a
proper solution for this performance problem for matviews for 15~.

Thoughts?
--
Michael

Commits

  1. Fix pg_visibility regression failure with CLOBBER_CACHE_ALWAYS

  2. Revert most of 39b66a91bd

  3. Fix COPY FREEZE with CLOBBER_CACHE_ALWAYS