Re: Run 4 postgresql session on ONE server?

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: Run 4 postgresql session on ONE server?
Дата
Msg-id Pine.LNX.4.33.0306131553120.21088-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Run 4 postgresql session on ONE server?  ("Daniel Seichter" <daniel@dseichter.de>)
Ответы Re: Run 4 postgresql session on ONE server?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
On Thu, 12 Jun 2003, Daniel Seichter wrote:

> Hello,
> I only know the traditional way of using postgreSQL:
> In serverprocess with an "unlimited" number of databases.
> But:
> Is is possible to have 4 processes, for each database one, running on one
> linux server?
>
> The reason is the following:
> I only have one server on which a productive database is working and a
> second database, which will be set upped at the moment.
> On my productive database I can't test with the parameters so I am searching
> for a way, that I can do the following:
> - let running for each database one serverprocess on the same machine
> - having for each database one pg_hba.conf and postgresql.conf (on testdb's,
> I want to log every SQL-statement, which is on a productive database
> impossible to log)
>
> I know, that you shouldn't test on a productive server, but at the moment
> this is the only way I can do but I hope to get an test server or a new
> productive server as soon as the second database is ready.

Yes, you can do it.  All you have to do is create four seperate accounts
for it to run under (pgsql1, pgsql2, pgsql3, pgsql4) and then in each of
those accounts, set up a different PGDATA value and initdb as that user.
Then edit each account's postgresql.conf to have a different port number
(I just incremented from 5432 to 5433 etc...) and start them up.

Then when you connect just specify the port of the database instance you
need.  Since each one is running as a different user with different
postgresql.conf and pg_hba.conf files you can lock the production instance
down tight to prevent brain farts (oops, I just dropped a table in the
production database) and you're gold.


В списке pgsql-admin по дате отправления:

Предыдущее
От: Michael Sheldon
Дата:
Сообщение: LAST REQUEST: Remove
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Run 4 postgresql session on ONE server?