Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WPvTi-0000M9-EE for pgsql-bugs@arkaria.postgresql.org; Tue, 18 Mar 2014 14:58:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WPvTh-0000bq-PW for pgsql-bugs@arkaria.postgresql.org; Tue, 18 Mar 2014 14:58:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WPvTg-0000bj-Rk for pgsql-bugs@postgresql.org; Tue, 18 Mar 2014 14:58:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WPvTd-00052i-NR for pgsql-bugs@postgresql.org; Tue, 18 Mar 2014 14:58:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s2IEwlJB009031; Tue, 18 Mar 2014 10:58:47 -0400 From: Tom Lane To: jesse.denardo@myfarms.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #9616: Materialized view with indexes unable to load from pg_dump In-reply-to: <20140318075427.20722.65161@wrigleys.postgresql.org> References: <20140318075427.20722.65161@wrigleys.postgresql.org> Comments: In-reply-to jesse.denardo@myfarms.com message dated "Tue, 18 Mar 2014 07:54:27 -0000" Date: Tue, 18 Mar 2014 10:58:47 -0400 Message-ID: <9030.1395154727@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 jesse.denardo@myfarms.com writes: > I have created several materialized views on one database. To copy data to a > new database, I dump the schema(s) of choice using pg_dump and pipe the > result to psql. The exact command looks like: > $ pg_dump -b -n -O -x -h localhost -U | psql -h host> -d -U > The materialized views get copied and restored just fine with one exception: > The one mat view that has indexes. Here is the result of \d on this mat > view: I can't reproduce this here; it seems clear that there's some triggering condition other than the mere presence of indexes. Could you submit a *self contained* example (preferably, a SQL script that makes a database that pg_dump misbehaves on)? The output looks a little bit like pg_dump might be trying to break some circular dependency involving the matview. But it's not obvious how you'd have gotten into such a situation, and we certainly haven't been shown all the moving parts. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs