Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VoI4w-0002Ln-1a for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Dec 2013 19:25:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VoI4v-0004dW-B9 for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Dec 2013 19:25:45 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VoI4t-0004dN-A5 for pgsql-bugs@postgresql.org; Wed, 04 Dec 2013 19:25:43 +0000 Received: from nm28.bullet.mail.bf1.yahoo.com ([98.139.212.187]) by makus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VoI4p-0000uQ-Kn for pgsql-bugs@postgresql.org; Wed, 04 Dec 2013 19:25:42 +0000 Received: from [66.196.81.174] by nm28.bullet.mail.bf1.yahoo.com with NNFMP; 04 Dec 2013 19:25:38 -0000 Received: from [98.139.212.208] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 04 Dec 2013 19:25:38 -0000 Received: from [127.0.0.1] by omp1017.mail.bf1.yahoo.com with NNFMP; 04 Dec 2013 19:25:38 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 778099.46271.bm@omp1017.mail.bf1.yahoo.com Received: (qmail 76155 invoked by uid 60001); 4 Dec 2013 19:25:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1386185138; bh=/Q5c/Glw5I+S4bGiLCXQ2/Qs+1Z6Gnii+1TEvUc3ISk=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=nzoD8Q/VaqGFsJvhvFiiyR3O84ioGY3UXsuzqZcZwAcEjzIfM/r6nMPZRMc5GVpB3KisXSMz6CjhT8WGfY9d2ziNf9krWvNC4tycxx9gy0ieLrAIakPJV0w/uM/5Zkl2z/gxbuFa539bvQ56cOhFn4WE4QEqclPlxbizUYGjtDM= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=I+/nSNj3rnzTnODlWL+wP/iwvCPK/Go56eF6tdhu51t64xGZTguztXLXQyXdtL0inzhg23ji6aw8NbioJdFTB8IJcGs5dMdUbitmbWW83rdCqTQud8eBziONVd98U24HsKdRC49vcfH3lIWGQ0YrZvHCPA/ZsUROa9yvA7MCL7s=; X-YMail-OSG: YJcjKegVM1nv.A95_qkdVToodtjNv06p67wn6wgkAjtXpvx VVmNcdmi9ZdEW2EQBjij.CnSJCnO_.ypCcbghvXYiXTm_PFdQS8wvEATu.YM 7pbzxOwAzX8UN4GBMt_sw_r_39csncy.icjGj.e40zCb8CAWsI.Cx4nQciOz .UNP0GtUIXRV7bJ29ZHOqFebHA0l8r2KrI_kRkpKsGTVGRU4rPW7Unsk.vr6 _IknAjr1Ot8MnIme4fBd3Lu9KhTsElpc2aTj_YMsZM_71bKQclPVCsRCWPWX dLXo00N0haY_XTX9OIAquBKuNLCALtxuzEll.lONebUJ5mEL05UZWBF3mFoc EeHMnOab8yjuuaQY6DTa8ZQYiYFSol9BRCCe41I0YPlcZjkPRW9hi.9akn1N CbVmjYqb2m_hGbH9mBXlvmrWIceSYqV40bHj5Z1o09yfzY2i3uK8XJq6W0lh MkazGQJIQyKod.R5zgXfEcKwTQdrY5OQp2yIoww64evX9o2ZpHTSkdw_iCYc yOdFa1t..KMOcBm6OPcjqlVOJZYdJVT.zejqLmxV_81TILt7D.Tl_CauLr8y jol.x3gJcI4pGzpH41mnv7LzaLr8VaSt1 Received: from [76.255.18.237] by web162901.mail.bf1.yahoo.com via HTTP; Wed, 04 Dec 2013 11:25:38 PST X-Rocket-MIMEInfo: 002.001, InNoYXVuY0BmYWN0ZmliZXIuY29tIiA8c2hhdW5jQGZhY3RmaWJlci5jb20.IHdyb3RlOgoKPiBJIGhhdmUgYSBsYXJnZSBkYXRhYmFzZSAoMTAwcyBvZiBtaWxsaW9ucyBvZiByb3dzKSBpbiB3aGljaCB0aGVyZQo.IGFyZSBtYW55ICJjaGFpbmVkIiBtYXRlcmlhbGl6ZWQgdmlld3MgLS0gdGhhdCBpczogc29tZSBkZXBlbmQgb24KPiBvdGhlcnMsIGV0Yy4uLgo.Cj4gV2hlbiBJIGJhY2sgdXAgYW5kIHRoZW4gcmVzdG9yZSwgb25seSB0aGUgImZpcnN0IGxheWVyIiBvZiB2aWV3cwo.IGFyZSByZWZyZXNoZWQBMAEBAQE- X-Mailer: YahooMailWebService/0.8.167.602 References: Message-ID: <1386185138.72693.YahooMailNeo@web162901.mail.bf1.yahoo.com> Date: Wed, 4 Dec 2013 11:25:38 -0800 (PST) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: BUG #8655: pg_restore problems with materialized views To: "shaunc@factfiber.com" , "pgsql-bugs@postgresql.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: 0.7 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org "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.=A0 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 --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs