Re: pg_upgrade and materialized views
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Claudio Freire <klaussfreire@gmail.com>, pgsql-bugs@postgresql.org
Date: 2018-02-20T22:05:29Z
Lists: pgsql-bugs
Andres Freund <andres@anarazel.de> writes: > The important part then happens in pg_dump. Note > if (dopt->binary_upgrade && > (tbinfo->relkind == RELKIND_RELATION || > tbinfo->relkind == RELKIND_FOREIGN_TABLE || > tbinfo->relkind == RELKIND_PARTITIONED_TABLE)) > note that the above if clause doesn't include materialized tables. Which > sems to explain this bug? Could you check that just updating the above > if to include matviews fixes the bug for you? I'm also wondering why it *does* include foreign tables. Surely relfrozenxid is meaningless for a FT? > Looking into this I also saw: > set_frozenxids(bool minmxid_only) > which makes a bit uncomfortable, but I can't quite put my finger on > why. The fact that it's inconsistent with the other list is surely a red flag, eg seems like we should include RELKIND_PARTITIONED_TABLE there too. regards, tom lane
Commits
-
Repair pg_upgrade's failure to preserve relfrozenxid for matviews.
- d3b0a23a2093 9.3.22 landed
- 9936f149952b 9.5.12 landed
- 66e203c851ab 9.6.8 landed
- 5ab5d21aaa0e 10.3 landed
- 38b41f182a66 11.0 landed
- 2d12c559335e 9.4.17 landed