backup question

From: Kasia Tuszynska <ktuszynska(at)esri(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: backup question
Date: 2009-03-31 23:27:10
Message-ID: 232B5217AD58584C87019E8933556D11011F008606@redmx2.esri.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kasia Tuszynska 2009-03-31 23:33:53 privilege inheritance to a login role through a group role
Previous Message Scott Marlowe 2009-03-31 16:20:29 Re: Vacuum Full