Any equivalent of MSSQL Detach?

Started by Kenneth Downsover 21 years ago2 messagesgeneral
Jump to latest
#1Kenneth Downs
firstinit.lastname@lastnameplusfam.net

I am wondering if it is possible to pick up a database from one computer and
move it over to another and then just plug it back in.

It appears that a database is stored inside of a directory that is named
after the db's OID. The directory contains what I am guessing are
individual files that are also named after various OIDs.

Can such things be picked up the way you would pick up a Microsoft database?

--
Kenneth Downs
Use first initial plus last name at last name plus literal "fam.net" to
email me

#2Doug McNaught
doug@mcnaught.org
In reply to: Kenneth Downs (#1)
Re: Any equivalent of MSSQL Detach?

Kenneth Downs <firstinit.lastname@lastnameplusfam.net> writes:

I am wondering if it is possible to pick up a database from one computer and
move it over to another and then just plug it back in.

No, unless you do the whole database cluster, and the two machines are
the same architecture and have the same version of PG, compiled the
same way. Basically there are a lot of interdependencies between
different parts of the database cluster, so you can't just grab a
single database and copy it over.

pg_dump is the way to go...

P.S. I'm replying to the list only because I can't be bothered to
demangle your address. If you don't get the reply, tough toenails.

-Doug