Re: Materialized views WIP patch - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Materialized views WIP patch
Date
Msg-id 20130216015725.GJ12030@momjian.us
Whole thread Raw
In response to Re: Materialized views WIP patch  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Materialized views WIP patch  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-hackers
On Fri, Feb 15, 2013 at 08:24:16PM -0500, Robert Haas wrote:
> On Fri, Feb 15, 2013 at 8:01 PM, Kevin Grittner <kgrittn@ymail.com> wrote:
> > There is one odd aspect to pg_dump, but I think the way it is
> > behaving is the best way to handle it, although I invite other
> > opinions.  If you load from pg_dump output, it will try to
> > populated materialized views which were populated on dump, and
> > leave the ones which were not scannable because the contents had
> > not been generated in an empty and unscannable state on restore.
> > That much seems pretty obvious.  Where it gets  a little tricky is
> > if mva is generated with data, and mvb is generated based on mva.
> > Then mva is truncated.  Then you dump.  mvb was populated at the
> > time of the dump, but its contents can't be regenerated on restore
> > because mva is not scannable.  As the patch currently stands, you
> > get an error on the attempt to REFRESH mvb.  I think that's a good
> > thing, but I'm open to arguments to the contrary.
> 
> Hmm, anything that means a dump-and-restore can fail seems like a bad
> thing to me.  There's nothing outrageous about that scenario.  It's
> arguable what state dump-and-restore should leave the new database in,
> but I don't see why it shouldn't work.  I predict we'll end up with
> unhappy users if we leave it like this.

pg_upgrade is going to fail on that pg_restore error.  :-(

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +



pgsql-hackers by date:

Previous
From: Satoshi Nagayasu
Date:
Subject: Re: [RFC] pgstattuple/pgstatindex enhancement
Next
From: Ants Aasma
Date:
Subject: Re: 9.2.3 crashes during archive recovery