From: | Kostis Mentzelos <mentzelos(at)gmx(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | pg_restore exclude schema from being droped option |
Date: | 2007-01-25 19:33:43 |
Message-ID: | 45B90617.5080904@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi list,
I am using pg_dump and pg_restore to backup and restore a database but
there is something
that I believe is missing from the restore process:
an option in pg_restore to exclude a schema from being dropped when -c
option is defined.
And here is why:
Suppose that I have a database with about 12 tables of customer data
(address, notes, configuration ... no more than 10.000 rows each) and 50
tables of history data (history files with about 1.000.000 rows each).
Now, to backup the database I choose to create 2 scripts, BackupData.sh
to backup all small tables and BackupHist.sh to backup history tables.
When I call pg_restore -c to restore data tables, pg_restore report a
failure because it is trying to drop a schema that it is not empty. So
it would be very helpful to have an option to exclude the schema (for
example: public) from being dropped.
I now that I there are some alternatives for example: pg_restore -l,
comment out the drop schema line and pg_restore -L or put data tables
and hist tables into separate schemas but an option to pg_restore would
be a lot easier, I guess.
What do you thing?
regards,
Kostis Mentzelos
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2007-01-25 19:38:03 | Re: Scanner/Parser question - what does _P imply? |
Previous Message | Andrew Dunstan | 2007-01-25 19:23:36 | BUG #2917: spi_prepare doesn't accept typename aliases such as 'integer' |