Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4z23-000815-5p for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Jun 2015 22:08:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z4z22-0003o0-AE for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Jun 2015 22:08:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z4z21-0003nl-MD for pgsql-bugs@postgresql.org; Tue, 16 Jun 2015 22:08:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z4z1y-00014R-DE for pgsql-bugs@postgresql.org; Tue, 16 Jun 2015 22:08:33 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t5GM8KHd011881; Tue, 16 Jun 2015 18:08:20 -0400 From: Tom Lane To: Marko Tiikkaja cc: Jeff Janes , Sergi Casbas , Pg Bugs Subject: Re: BUG #13444: psql can't recover a pg_dump. In-reply-to: <558094E7.9070606@joh.to> References: <20150615105517.2730.47745@wrigleys.postgresql.org> <558094E7.9070606@joh.to> Comments: In-reply-to Marko Tiikkaja message dated "Tue, 16 Jun 2015 23:28:07 +0200" Date: Tue, 16 Jun 2015 18:08:20 -0400 Message-ID: <1817.1434492500@sss.pgh.pa.us> X-Pg-Spam-Score: -2.5 (--) 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 Marko Tiikkaja writes: > This sounds like it might be a duplicate of bug #12465: > http://www.postgresql.org/message-id/20150108212429.11502.18220@wrigleys.postgresql.org It's hard to tell on the basis of the supplied info what exactly is the OP's specific problem. However, although I rejected #12465 as not-a-bug, there definitely are issues with functions in materialized views, because pg_dump lacks enough information to understand what dependencies might be implied by the bodies of the functions. We've also seen reports of cases where it nominally worked, but took forever, because execution of the matview queries was too slow for lack of not-yet-restored indexes or for lack of planner statistics. A simple response would be to delay all the REFRESH MATVIEW commands to the end of the dump script, but (1) that doesn't fix the lack-of-ANALYZE problem, and (2) it plays hob with the notion of pre-data/data/post-data section boundaries, unless you're willing to reclassify the REFRESH commands as not being "data". 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