Re: how to create multiple databases running in different dirs - Mailing list pgsql-general

From frank ernest
Subject Re: how to create multiple databases running in different dirs
Date
Msg-id trinity-ca10a953-5901-4a49-a7e4-afe2d8a18ba3-1404343474277@3capp-mailcom-lxa06
Whole thread Raw
In response to how to create multiple databases running in different dirs  ("frank ernest" <doark@mail.com>)
Responses Re: how to create multiple databases running in different dirs  (John W Higgins <wishdev@gmail.com>)
Re: how to create multiple databases running in different dirs  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
> how would an instance of your program know what to connect to, or which
> previous instance its 'predecessor' was ?

> normally, you have ONE database for a given set of applications, and all
> the applications share the same database tables and such.


That's the problem, is there some way to tell pgsql "Go to dir X, open your data base Y and prepare for
connectionsat adress Z and port P"? And could pgsql accept multiple connections on the same address and port? I
wasthinking of using my pID but that would change and if I used a user created string then if I started only on a
singleinstace of pgsql and pointed it to it's databases the user might get the strings duplicated and that would be
nogood. I also thought of naming each database with a name generated by using the uuid library but I'm not sure
whichwould be best. 

 

If I choose to have multiple servers running on the same machine how would my program start them?

 

> Is each runtime instance of your application to have a new, empty
> database? No data from any other run of the application?

 

No, the dynamically generated content is to be dropped (drop table dynamic_content;) but the rest is to be preserved.
Theidea is to create a database of a file system but the files contain no data, I only want their metadata and I will
adda few additional metadta values to each file. 

 

Thanks, David

 

pgsql-general by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Two-way encryption
Next
From: John W Higgins
Date:
Subject: Re: how to create multiple databases running in different dirs