Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XEmqD-0005LT-0F for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Aug 2014 22:04:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XEmqC-0004PC-Do for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Aug 2014 22:04:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XEmjC-0002k7-Dj for pgsql-bugs@postgresql.org; Tue, 05 Aug 2014 21:57:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XEmj8-000894-N3 for pgsql-bugs@postgresql.org; Tue, 05 Aug 2014 21:57:05 +0000 MIME-Version: 1.0 Subject: BUG #11128: Error in pg_restore with materialized view To: pgsql-bugs@postgresql.org From: mpmilanez@gmail.com Date: Tue, 05 Aug 2014 21:56:32 +0000 Message-ID: <20140805215632.2708.93022@wrigleys.postgresql.org> X-Pg-Spam-Score: -0.3 (/) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 The following bug has been logged on the website: Bug reference: 11128 Logged by: Marcos Paulo Milanêz Santana Email address: mpmilanez@gmail.com PostgreSQL version: 9.3.4 Operating system: CentOS 6.5 Description: I'm trying to restore a database after creating some materialized views. This is the command used for dump: pg_dump --blobs -Fc -f bkp_database_siop.dmp.fc -x siop; The command used for restore: pg_restore -Fc -C -O -x -v -j 4 --disable-triggers -d postgres bkp_database_siop.dmp.fc; Here is the error I get: pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 12351; 0 3565870 MATERIALIZED VIEW DATA vw_ws_execucaoorcamentaria_mensal_sispes postgres pg_restore: [archiver (db)] could not execute query: Command was: REFRESH MATERIALIZED VIEW vw_ws_execucaoorcamentaria_mensal_sispes; pg_restore: finished item 12351 MATERIALIZED VIEW DATA vw_ws_execucaoorcamentaria_mensal_sispes pg_restore: launching item 9983 CONSTRAINT pk_analiseemenda pg_restore: [archiver (db)] could not execute query: no connection to the server Command was: SET statement_timeout = 0; pg_restore: [archiver (db)] could not execute query: no connection to the server Command was: SET lock_timeout = 0; pg_restore: [archiver (db)] could not execute query: no connection to the server Command was: SET client_encoding = 'UTF8'; pg_restore: [archiver (db)] could not execute query: no connection to the server Command was: SET standard_conforming_strings = on; pg_restore: [archiver (db)] could not execute query: no connection to the server Command was: SET check_function_bodies = false; pg_restore: [archiver (db)] could not execute query: no connection to the server Command was: SET client_min_messages = warning; pg_restore: [archiver (db)] could not execute query: no connection to the server Command was: pg_restore: creating CONSTRAINT pk_analiseemenda pg_restore: [archiver] Error from TOC entry 9983; 2606 18281 CONSTRAINT pk_analiseemenda postgres pg_restore: [archiver] could not set search_path to "emenda": no connection to the server pg_restore: [archiver] could not set default_tablespace to "": no connection to the server pg_restore: [archiver (db)] could not execute query: no connection to the server Command was: ALTER TABLE ONLY analiseemenda ADD CONSTRAINT pk_analiseemenda PRIMARY KEY (analiseemendaid); pg_restore: finished item 9983 CONSTRAINT pk_analiseemenda pg_restore: launching item 9984 INDEX uk_analiseemenda_01 pg_restore: [archiver (db)] could not execute query: no connection to the server Command was: SET statement_timeout = 0; ... I've tried restoring the dump with just one job instead of 4. It finished with success, but the total time increased by approximately 2h. What do I need to do to fix this? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs