Hello Postgres Gurus,

I have a restore problem.

If you do the backup as a text file:
pg_dump.exe -i -h machine -p 5432 -U postgres -F p -v -f 
"C:\dbname_text.dump.backup" dbname

You can see the order in which the restore will happen. And the restore seems 
to be happening in the following order
create objects  (objects named in descending order of schema name.tablename), 
adam.table is created before public.table
populate objects  (objects named in descending order of schema name.tablename), 
adam.table is populated before public.table
grant privs to objects  (objects named in descending order of schema 
name.tablename) adam.table is granted privs to before public.table

The problem arises, if data in lets say the adam schema is dependent on tables 
in the public schema, since the data in the public schema does not exist yet, 
being created later.

If there was an option to do a backup and restore of a single schema, that 
would solve my problem.

Has anyone dealt with this issue before? Any workarounds?

Thank you,
Sincerely,
Kasia

Reply via email to