Moving a PostgreSQL database from one server to another

Les Mikesell les at futuresource.com
Thu Jan 13 23:20:38 UTC 2005


On Thu, 2005-01-13 at 17:12, Rodolfo J. Paiz wrote:

> $ pg_dump -ovFc -f flightlog.out flightlog
> 
> This is because some of the tables do referential integrity to others.
> For example, when inserting the destination airport for a flight (in the
> flights table), it checks to see that this airport in fact exists in the
> airports table. Am I correct in assuming that this requires the "-o"
> parameter? And is there any other problem that might exist with this
> command incantation?

No, oids are an internal identifier that you can use if you don't have
your own primary key, but you shouldn't.  You only need -o if you
reference an oid, but it shouldn't break anything either.


> Note that this is not the only command I've tried... it's just what my
> manpage reading says might be the command I really want to run. I've
> tested as well with simpler things like "pg_dump flightlog > f.out".

If you leave off the output redirection, do you see any output at all?
I guess I'd try a brute-force 'strace  pg_dump flightlog' next and
wade through the output for errors opening files, etc.

-- 
  Les Mikesell
    les at futuresource.com





More information about the users mailing list