Re: database files

From: Ken Godee <ken(at)perfect-image(dot)com>
To: "pgsql-general (at) postgresql (dot) org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: database files
Date: 2003-10-23 16:03:34
Message-ID: 3F97FBD6.2050908@perfect-image.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On 22/10/2003 20:41 Gail Zacharias wrote:
>
>> I am investigating the possibility of using pgsql as the database in an
>> application. I have some unusual requirements that I'd like to ask you
>> all about. I apologize in advance if my terminology is a little "off",
>> I'm not familiar with pgsql (yet).
>>
>> I need to be able to move the database files, as normal user-visible
>> files, between machines. I.e. given a database on machine A, I want to be
>> able to copy either a single file (ideally) or a single directory (less
>> ideal but still ok) to, say, a zip drive, bring it over to another
>> machine (with pgsql also installed), start up my application and have it
>> access the copied database through pgsql.
>>
>> Is this sort of thing possible? Is a database stored in a single file or
>> multiple files? Can the location of the file(s) be controlled? Are the
>> files accessible and consistent while pgsql is running? I assume not all
>> the time, but is there a reliable way to make them accessible (i.e.
>> copyable) and consistent short of shutting down pgsql?

Couldn't one ...
export PGDATA2 = /usr/local/database
create the original database in the PGDATA2
and then when you want to copy it, stop postgres,
recursively copy the database directory, start postgres.

On new machine...
export PGDATA2 = /usr/local/database
copy original database to new machine
start postrges

Would not postgres be able to connect to this
copied database on the new machine?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ashwin Kutty 2003-10-23 16:57:52 Re: Setting up DSPACE for Postgres access
Previous Message Ron 2003-10-23 16:02:03 Nullable 'Foreign Key-like' Constraint