Re: 2 postgresql processes on the same machine ?

Поиск
Список
Период
Сортировка
От Robby Russell
Тема Re: 2 postgresql processes on the same machine ?
Дата
Msg-id 1090557140.2575.69.camel@vacant
обсуждение исходный текст
Ответ на 2 postgresql processes on the same machine ?  ("Jean-Guillaume LALANNE" <jeanguillaume.lalanne@capgemini.com>)
Список pgsql-general
On Thu, 2004-07-22 at 06:02, Jean-Guillaume LALANNE wrote:
> Hi,
>
> I am pretty new to the postgresql community.
> My question may seem a little bit strange but
> I'd like to know if it is possible to run 2
> postgresql processes with 2 separate databases on the
> same machine (change of the ports, different paths to
> logs, ...)?
>
> Thanks in advance for your answers.
>
> Best Regards,
>
> Jean-Guillaume LALANNE

Yep, this is quite simple actually.

For example, say you want user X to have their own DB instance that they
can stop/start when ever they choose.

(logs into shell as new user)

[allison@vacant allison]$ initdb --username=admin -W pgdata
The files belonging to this database system will be owned by user
"allison".
This user must also own the server process.

     
The database cluster will be initialized with locale en_US.UTF-8.

     
creating directory pgdata... ok
creating directory pgdata/base... ok
creating directory pgdata/global... ok
creating directory pgdata/pg_xlog... ok
creating directory pgdata/pg_clog... ok
selecting default max_connections... 100
selecting default shared_buffers... 1000
creating configuration files... ok
creating template1 database in pgdata/base/1... ok
initializing pg_shadow... ok
Enter new superuser password:
Enter it again:
setting password... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok
loading pg_description... ok
creating conversions... ok
setting privileges on built-in objects... ok
creating information schema... ok
vacuuming database template1... ok
copying template1 to template0... ok

Success. You can now start the database server using:

    /usr/bin/postmaster -D pgdata
or
    /usr/bin/pg_ctl -D pgdata -l logfile start

...then edit the file:
joe pgdata/postgresql.conf
Change #port = 5432
(port of your choice)

save file

then issue:

>  /usr/bin/pg_ctl -D pgdata -l logfile start
> postmaster successfully started

Voila. :-)

-Robby



--
Robby Russell | Owner.Developer.Geek
PLANET ARGON  | www.planetargon.com
Portland, OR  | robby@planetargon.com
503.351.4730  | blog.planetargon.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: AllocSetFree: cannot find block containing chunk 507928
Следующее
От: Holger Klawitter
Дата:
Сообщение: Re: any benefit to preparing a sql function?