pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #8655: pg_restore problems with materialized views 2+ messages / 2 participants [nested] [flat]
* BUG #8655: pg_restore problems with materialized views @ 2013-12-04 07:12 shaunc@factfiber.com 0 siblings, 1 reply; 2+ messages in thread From: shaunc@factfiber.com @ 2013-12-04 07:12 UTC (permalink / raw) To: pgsql-bugs The following bug has been logged on the website: Bug reference: 8655 Logged by: Shaun Cutts Email address: shaunc@factfiber.com PostgreSQL version: 9.3.1 Operating system: mac os 10.8.5 Description: I have a large database (100s of millions of rows) in which there are many "chained" materialized views -- that is: some depend on others, etc... When I back up and then restore, only the "first layer" of views are refreshed. I can then go back and manually restore missing views with "-t" -- though if I do too many at once the same thing happens. I have tried to generate a small test case, but with no luck. I suspect that pg_restore needs to issue "refresh" before it creates successive views, and in "small" cases it gets that right -- but there is some arbitrariness in the order that trips it up in sufficiently complex cases. I also have indexes defined on the materialized views. I don't know if that matters -- an extra sequencing problem for restore though. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #8655: pg_restore problems with materialized views @ 2013-12-04 19:25 Kevin Grittner <kgrittn@ymail.com> parent: shaunc@factfiber.com 0 siblings, 0 replies; 2+ messages in thread From: Kevin Grittner @ 2013-12-04 19:25 UTC (permalink / raw) To: shaunc@factfiber.com <shaunc@factfiber.com>; pgsql-bugs "shaunc@factfiber.com" <shaunc@factfiber.com> wrote: > I have a large database (100s of millions of rows) in which there > are many "chained" materialized views -- that is: some depend on > others, etc... > > When I back up and then restore, only the "first layer" of views > are refreshed. I can then go back and manually restore missing > views with "-t" > -- though if I do too many at once the same thing happens. > > I have tried to generate a small test case, but with no luck. Yeah, it should work, and I have run a lot of test cases without seeing this. The one case that is a little weird is when you populate a materialized view "b" which references materialized view "a", REFRESH MATERIALIZED VIEW "a" WITH NO DATA, and then dump. > I suspect that pg_restore needs to issue "refresh" before it > creates successive views, and in "small" cases it gets that right > -- but there is some arbitrariness in the order that trips it up > in sufficiently complex cases. That does sound likely, but without a failing case, it is going to be hard to diagnose. > I also have indexes defined on the materialized views. I don't > know if that matters -- an extra sequencing problem for restore > though. Those are all supposed to be handled, but if there is an unidentified bug, who knows what matters? Have you tried restoring a schema-only dump and populating it with minimal data, and seeing whether you can replicate it that way? -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2013-12-04 19:25 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2013-12-04 07:12 BUG #8655: pg_restore problems with materialized views shaunc@factfiber.com 2013-12-04 19:25 ` Kevin Grittner <kgrittn@ymail.com>
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