Re: [HACKERS] pg_dump does not refresh matviews from extensions - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: [HACKERS] pg_dump does not refresh matviews from extensions
Date
Msg-id dbe9d2c7-31e1-f1af-bf63-accb3b895452@BlueTreble.com
Whole thread Raw
In response to Re: [HACKERS] pg_dump does not refresh matviews from extensions  (Stephen Frost <sfrost@snowman.net>)
Responses Re: [HACKERS] pg_dump does not refresh matviews from extensions  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2/21/17 2:05 PM, Stephen Frost wrote:
> As for $SUBJECT, I feel like it really depends, doesn't it?  If the
> extension creates the matview w/ no data in it, and doesn't mark it as a
> config table, should we really refresh it?  On the other hand, if the
> extension creates the matview and either refreshes it, or something
> else refreshes it later, then perhaps we should do so too, to get us
> back to the same state.

I didn't think to test marking the matview as dumpable. If I do that 
then a refresh item does get created, and it's actually based on whether 
the view contains any data. We should at least document that.

Now that I know that, I guess I'm kinda on the fence about doing it 
automatically, because AFAIK there'd be no way to override that 
automatic behavior. I can't really conceive of any reason you wouldn't 
want the refresh, but since it's not happening today...
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)



pgsql-hackers by date:

Previous
From: Michael Banck
Date:
Subject: Re: [HACKERS] Change in "policy" on dump ordering?
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Packages: Again