Skip site navigation (1) Skip section navigation (2)

BUG #5684: pg_restore does not restore schemas

From: "Nathan Gorter" <nathan(at)vanbelle(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5684: pg_restore does not restore schemas
Date: 2010-09-29 18:20:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      5684
Logged by:          Nathan Gorter
Email address:      nathan(at)vanbelle(dot)com
PostgreSQL version: 8.3.11
Operating system:   i686-redhat-linux-gnu
Description:        pg_restore does not restore schemas

I am attempting to perform a dump from one database, create a new database,
and restore the data to that new database. In my old database I have schemas
besides the public schema that I have created myself. The pg_dump works fine
and the pg_restore does not generate any errors, but the pg_restore fails to
create the extra schemas, and instead restores the tables in those other
schemas into the public schema. I have included my pg_dump and pg_restore
commands below. I have tried the pg_restore command with and without the -c
switch, and I have tried calling pg_restore twice, the first time using the
-s switch and the second time using the -a switch. None of these have
worked. On a note, when I manually create the extra schemas myself before
performing the restore, it all works correctly.

pg_dump command: [C:\Workspaces\Nathan\Database Backup Tool\pg_dump.exe,
-fC:\Workspaces\Nathan\Database Backup Tool\plantango_v1.backup, -Fc, -o,
-tball.ball_goals, -tball.ball_plant_po, -tball.ball_plants,
-tball.ball_po_update_reasons, -tpublic.ar_so, -tpublic.ar_so_line,
-tpublic.common_country, -tpublic.common_province, -tpublic.gl_department,
-tpublic.in_crop, -tpublic.in_crop_adjustment, -tpublic.in_crop_history,
-tpublic.in_dump_reason, -tpublic.in_item, -tpublic.in_location,
-tpublic.in_pool, -tpublic.in_product, -tpublic.in_site, -tpublic.in_size,
-tpublic.label_series, -tpublic.pack_order, -tpublic.pack_record,
-tpublic.pack_shipping_container, -tpublic.p_group, -tpublic.p_group_member,
-tpublic.pick_record, -tpublic.prd_crop_schedule, -tpublic.prd_crop_step,
-tpublic.prd_customer_goal, -tpublic.prd_customer_item_goal,
-tpublic.prd_goal, -tpublic.prd_method, -tpublic.prd_period,
-tpublic.prd_sales_goal, -tpublic.prd_schedule, -tpublic.rs_carrier,
-tpublic.rs_load, -tpublic.rs_schedule, -tpublic.sa_context,
-tpublic.sa_customer, -tpublic.sa_period, -tpublic.sa_v_item,
-tpublic.sa_v_item_reservation, -v, -i, -Z9, -h10.10.10.200, -p5432,
-Unathan, plantango_v1]

pg_restore command: [C:\Workspaces\Nathan\Database Backup
Tool\pg_restore.exe, -c, -dplantango_v1 (Restored on 2010-9-29 11-18-22),
-i, -v, -hchaucer, -p5432, -Unathan, C:\Workspaces\Nathan\Database Backup


pgsql-bugs by date

Next:From: KeenanDate: 2010-09-29 20:33:20
Subject: BUG #5685: Installer Error
Previous:From: Chris RossDate: 2010-09-29 18:19:52
Subject: Re: Unexpected omission of tables with duplicate names across schemas

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group