From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Claudio Freire <klaussfreire@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: pg_upgrade and materialized views
Date: Tue, 20 Feb 2018 17:05:29 -0500
Message-ID: <25875.1519164329@sss.pgh.pa.us> (raw)
In-Reply-To: <20180220215420.cdmx6bfqtzasjjcs@alap3.anarazel.de>
References: <CAGTBQpbrY9CdRGGhyBZ9yqY4jWaGC85rUF4X+R7d-aim=mBNsw@mail.gmail.com>
<20180220215420.cdmx6bfqtzasjjcs@alap3.anarazel.de>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, klaussfreire@gmail.com
Subject: Re: pg_upgrade and materialized views
In-Reply-To: <25875.1519164329@sss.pgh.pa.us>
References: <CAGTBQpbrY9CdRGGhyBZ9yqY4jWaGC85rUF4X+R7d-aim=mBNsw@mail.gmail.com> <20180220215420.cdmx6bfqtzasjjcs@alap3.anarazel.de> <25875.1519164329@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox