Re: Problem with pg_dump / pg_restore

From: "Armel HERVE" <ah(dot)pgsql(at)laposte(dot)net>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Problem with pg_dump / pg_restore
Date: 2003-12-01 09:43:30
Message-ID: CGEBLCNHICNOBNMINIICGEDMCDAA.ah.pgsql@laposte.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


Hi Mark,

in fact, the problem is in the structure backup: this command doesn't care
about views dependencies. It take views in creation order to put its in
the .sql. So I have to reorder manually this view creations.
I made a view (another...) to look for dependencies. Maybe it's the good
way.

This view give, for each view oid, the dependencies:
SELECT dep.objid,
(SELECT pg_rewrite.ev_class
FROM pg_rewrite
WHERE (pg_rewrite.oid = dep.objid )) AS trueoid,
dep.refobjid
FROM pg_depend dep, pg_rewrite rew, pg_class "class"
WHERE dep.objid >= 30000
AND rew.oid = dep.objid
AND dep.refobjid = "class".oid
AND "class".relkind = 'v'
AND rew.ev_class <> dep.refobjid;

Armel

-----Message d'origine-----
De : pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org]De la part de Mark Carew
Envoyé : lundi 1 décembre 2003 10:00
À : pgsql-admin(at)postgresql(dot)org
Objet : Re: [ADMIN] Problem with pg_dump / pg_restore

Hi Armel,

Why not do a structure only dump to plain text and see if you can use
that as your start .sql ext file for 'psql -e .. etc'. Eliminates the
necessity to have an active client side data dictionary. BTW, your english
is fine.

Regards
markcarew@
magicwanddept.com.au

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Oliver Elphick 2003-12-01 13:38:51 Re: db-recovery after update 7.1 -> 7.4 failed
Previous Message Dominique Fenenr 2003-12-01 09:35:58 db-recovery after update 7.1 -> 7.4 failed