Re: how to create multiple databases running in different dirs

From: Rémi Cura <remi(dot)cura(at)gmail(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: how to create multiple databases running in different dirs
Date: 2014-07-01 14:19:28
Message-ID: CAJvUf_uhsiHU8fBsyx4yukyWXDAAsyCm7UFe9kKA540FY1q2kQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hey,
postgres already takes care of multiple client writting/reading,
so you don't really need to be afraid of concurrency (for most of the stuff)

If it is so your desire, you could also have multiple server on the same
machine (althought on different port).
This way each server would have its own repository.

Cheers,
Rémi-C

2014-07-01 4:59 GMT+02:00 John R Pierce <pierce(at)hogranch(dot)com>:

> On 6/30/2014 4:58 PM, frank ernest wrote:
>
>> Hi, I'm new to postgresql and sql in general. I desired to write a
>> program in C that used an sql data base for IPC and because multiple copies
>> of my program might run on the same machine I wanted a way to ensure that
>> only one copy of each multithreaded program got one database but I'm
>> uncertain how to go about this. As the program might be run several
>> different times and each time it should only get the data base from it's
>> predisesor I can't use the pid as a unique data base name. I thought that I
>> might start multiple pgsql instances but somehow that seems wrong. Any
>> ideas?
>>
>
> 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.
>
>
> --
> john r pierce 37N 122W
> somewhere on the middle of the left coast
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2014-07-01 15:03:05 Re: Validating User Login Within Postgres
Previous Message hubert depesz lubaczewski 2014-07-01 14:10:38 Re: Validating User Login Within Postgres