Re: pg_upgrade and materialized views

Claudio Freire <klaussfreire@gmail.com>

From: Claudio Freire <klaussfreire@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Date: 2018-02-20T21:44:53Z
Lists: pgsql-bugs
On Tue, Feb 20, 2018 at 6:27 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> (2) independently of that, it sounds like REFRESH
> MATERIALIZED VIEW CONCURRENTLY is somehow preventing advancement of the
> matview's relfrozenxid in the source DB.

About that, I did check the view's relfrozenxid and its rows' xmin to
see if there was some obvious breakage.

The following query:

select * from device_specs_ranking_mv where age(xmin) > age((select
relfrozenxid from pg_class where relname = 'device_specs_ranking_mv'))
limit 1;

Yields empty results both in the master and the replica, which, unless
I did something wrong in that query, would rule out replication
issues.


Commits

  1. Repair pg_upgrade's failure to preserve relfrozenxid for matviews.