From hjs@rmax.nl Tue Jul 4 11:21:59 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id A1EC79FA350 for ; Tue, 4 Jul 2006 08:21:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 86265-04 for ; Tue, 4 Jul 2006 08:21:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from michael.eatserver.nl (michael.eatserver.nl [212.203.14.103]) by postgresql.org (Postfix) with ESMTP id 758D09FA2F3 for ; Tue, 4 Jul 2006 08:21:52 -0300 (ADT) Received: from dvipc (82-170-251-187.dsl.ip.tiscali.nl [82.170.251.187]) (authenticated bits=0) by michael.eatserver.nl (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id k64BLpHh032137 for ; Tue, 4 Jul 2006 13:21:51 +0200 From: "H.J. Sanders" To: Subject: FW: 2 instances Date: Tue, 4 Jul 2006 13:21:53 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000A_01C69F6C.D0F85DA0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Importance: Normal X-Virus-Scanned: by amavisd-new X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/8 X-Sequence-Number: 22254 This is a multi-part message in MIME format. ------=_NextPart_000_000A_01C69F6C.D0F85DA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hello. I would like to run 2 instances of postgresql with 2 different data-directories: dir-a en dir-b. Looking trough the archives I came to the next setup: I created this 2 different directories and 2 users each with a different PGDATA(dir-a and dir-b) in their .profile Using this 2 users i did twice initdb and createdb xyz with the first user. in postgresql.conf of the second directory I changed the port to 5433 and also entered this port in /etc/services and started the second postmaster, ps -f shows it is running. If I now want to create the same database xyz in the second directory using the second user, the database is already there! What am I missing? Many thanks Henk Sander ------=_NextPart_000_000A_01C69F6C.D0F85DA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 

 
Hello.
 
I would like to = run 2=20 instances of postgresql with 2 different data-directories: dir-a en=20 dir-b.
 
Looking trough = the archives I=20 came to the next setup:
 
I created this 2 = different=20 directories and 2 users each with a different PGDATA(dir-a and dir-b) in their=20 .profile
Using this 2 = users i did=20 twice initdb and createdb xyz with the first user.
 
in = postgresql.conf of the=20 second directory I changed  the port to 5433 and also entered = this port=20 in /etc/services and started the second
postmaster, ps -f = shows it is=20 running.
 
If I now want to = create the=20 same database xyz in the second directory using the second=20 user,
the database is = already=20 there!
 
What am I=20 missing?
 
Many=20 thanks
 
Henk=20 Sander
 
 
 

------=_NextPart_000_000A_01C69F6C.D0F85DA0-- From andy@andycc.net Tue Jul 4 11:26:57 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 34A9F9FA350 for ; Tue, 4 Jul 2006 08:26:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 87196-01 for ; Tue, 4 Jul 2006 08:26:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sydney.mailnetwork.co.uk (server88-208-192-113.live-servers.net [88.208.192.113]) by postgresql.org (Postfix) with ESMTP id D45A19FA2F3 for ; Tue, 4 Jul 2006 08:26:46 -0300 (ADT) Received: from [213.146.143.243] (port=46597 helo=it020361) by sydney.mailnetwork.co.uk with esmtpa (Exim 4.60) (envelope-from ) id 1Fxj3E-0002sL-FE; Tue, 04 Jul 2006 12:26:44 +0100 Reply-To: From: "Andy Shellam" To: "'H.J. Sanders'" Cc: Subject: Re: FW: 2 instances Date: Tue, 4 Jul 2006 12:27:57 +0100 Organization: the mail network Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0038_01C69F65.47EE9850" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Thread-Index: AcafXEpcCoeAsw6nTuSSLTMI6EfDwAAAHYSQ In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/9 X-Sequence-Number: 22255 This is a multi-part message in MIME format. ------=_NextPart_000_0038_01C69F65.47EE9850 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit How are you connecting to Postgres? Note that you'll always need to give the port 5433 to connect to the second instance in any tool you use (psql, pg_dump, other management utilities etc), otherwise you'll always connect to the "default" instance on 5432. Andy _____ From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of H.J. Sanders Sent: 04 July 2006 12:22 pm To: pgsql-admin@postgresql.org Subject: [ADMIN] FW: 2 instances Hello. I would like to run 2 instances of postgresql with 2 different data-directories: dir-a en dir-b. Looking trough the archives I came to the next setup: I created this 2 different directories and 2 users each with a different PGDATA(dir-a and dir-b) in their .profile Using this 2 users i did twice initdb and createdb xyz with the first user. in postgresql.conf of the second directory I changed the port to 5433 and also entered this port in /etc/services and started the second postmaster, ps -f shows it is running. If I now want to create the same database xyz in the second directory using the second user, the database is already there! What am I missing? Many thanks Henk Sander !DSPAM:14,44aa4fb8256841932014477! ------=_NextPart_000_0038_01C69F65.47EE9850 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

How are you connecting to = Postgres?

 

Note that you’ll always need = to give the port 5433 to connect to the second instance in any tool you use = (psql, pg_dump, other management utilities etc), otherwise you’ll always = connect to the “default” instance on = 5432.

 

Andy

 


From: = pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of H.J. Sanders
Sent: 04 July 2006 12:22 = pm
To: = pgsql-admin@postgresql.org
Subject: [ADMIN] FW: 2 = instances

 

 

=


 

Hello.

 

=

I would like to run 2 instances of postgresql with 2 different data-directories: dir-a en = dir-b.

 

=

Looking trough the archives I came = to the next setup:

 

=

I created this 2 different = directories and 2 users each with a different PGDATA(dir-a and dir-b) in their = .profile

Using this 2 users i did twice = initdb and createdb xyz with the first user.

 

=

in postgresql.conf of the second directory I changed  the port to 5433 and also entered this port in /etc/services and started the second

postmaster, ps -f shows it is = running.

 

=

If I now want to create the same = database xyz in the second directory using the second user,

the database is already = there!

 

=

What am I = missing?

 

=

Many thanks

 

=

Henk Sander

 

=

 

=

 

=

!DSPAM:14,44aa4fb8256841932014477! =

------=_NextPart_000_0038_01C69F65.47EE9850-- From andy@andycc.net Tue Jul 4 13:26:21 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 1575E9FA2F3 for ; Tue, 4 Jul 2006 10:26:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 98271-05 for ; Tue, 4 Jul 2006 10:26:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sydney.mailnetwork.co.uk (server88-208-192-113.live-servers.net [88.208.192.113]) by postgresql.org (Postfix) with ESMTP id 2DEBC9FAC76 for ; Tue, 4 Jul 2006 10:26:06 -0300 (ADT) Received: from [213.146.143.243] (port=31066 helo=it020361) by sydney.mailnetwork.co.uk with esmtpa (Exim 4.60) (envelope-from ) id 1Fxkuj-0004L6-9p; Tue, 04 Jul 2006 14:26:05 +0100 Reply-To: From: "Andy Shellam" To: "'H.J. Sanders'" Cc: Subject: Re: FW: 2 instances Date: Tue, 4 Jul 2006 14:27:17 +0100 Organization: the mail network Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0042_01C69F75.F4301660" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Thread-Index: AcafaQpPyzPT4mbdRJm7h7VPtk3MYgAAE9AA In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/10 X-Sequence-Number: 22256 This is a multi-part message in MIME format. ------=_NextPart_000_0042_01C69F75.F4301660 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit The problem you've got is that there'll always be 2 configurations - one for your "default" instance and one for your 5433 instance. I believe (I could be wrong here), that postgresql.conf is just for the server side - it's the client tools you're connecting with, so they need to know which port to connect to (of which 5432 is default, unless changed in your configure script.) You could put: PGPORT=XXXX export PGPORT in each of your user's .profile (or .bash_profile) scripts (replacing XXXX with either 5432 or 5433 dependent on which cluster you want the user to connect to.) Then the PG client tools will read that as the port number (to save putting "-p 5433" in the command line.) Regards Andy _____ From: H.J. Sanders [mailto:hjs@rmax.nl] Sent: 04 July 2006 1:54 pm To: andy@andycc.net Subject: RE: [ADMIN] FW: 2 instances Hello Andy. This does indeed the tric ( -p 5433). I expected that this port 5433 would be taken from $PGDATA/postgresql.conf Is this also possible? Many thanks Henk -----Oorspronkelijk bericht----- Van: Andy Shellam [mailto:andy@andycc.net] Verzonden: dinsdag 4 juli 2006 13:28 Aan: 'H.J. Sanders' CC: pgsql-admin@postgresql.org Onderwerp: RE: [ADMIN] FW: 2 instances How are you connecting to Postgres? Note that you'll always need to give the port 5433 to connect to the second instance in any tool you use (psql, pg_dump, other management utilities etc), otherwise you'll always connect to the "default" instance on 5432. Andy _____ From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of H.J. Sanders Sent: 04 July 2006 12:22 pm To: pgsql-admin@postgresql.org Subject: [ADMIN] FW: 2 instances Hello. I would like to run 2 instances of postgresql with 2 different data-directories: dir-a en dir-b. Looking trough the archives I came to the next setup: I created this 2 different directories and 2 users each with a different PGDATA(dir-a and dir-b) in their .profile Using this 2 users i did twice initdb and createdb xyz with the first user. in postgresql.conf of the second directory I changed the port to 5433 and also entered this port in /etc/services and started the second postmaster, ps -f shows it is running. If I now want to create the same database xyz in the second directory using the second user, the database is already there! What am I missing? Many thanks Henk Sander !DSPAM:14,44aa651c256842130418775! ------=_NextPart_000_0042_01C69F75.F4301660 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

The problem you’ve got is = that there’ll always be 2 configurations – one for your “default” = instance and one for your 5433 instance.

 

I believe (I could be wrong here), = that postgresql.conf is just for the server side – it’s the = client tools you’re connecting with, so they need to know which port to connect = to (of which 5432 is default, unless changed in your configure = script.)

 

You could = put:

 

PGPORT=3DXXXX

export = PGPORT

 

in each of your user’s = .profile (or .bash_profile) scripts (replacing XXXX with either 5432 or 5433 = dependent on which cluster you want the user to connect to.)  Then the PG client = tools will read that as the port number (to save putting “-p 5433” = in the command line.)

 

Regards

=

 

Andy

 


From: H.J. = Sanders [mailto:hjs@rmax.nl]
Sent: 04 July 2006 1:54 = pm
To: andy@andycc.net
Subject: RE: [ADMIN] FW: = 2 instances

 

Hello = Andy.

 

This does indeed the tric  ( = -p 5433).

 

I expected that this port 5433 = would be taken from $PGDATA/postgresql.conf

 

Is this also = possible?

 

Many = thanks

 

Henk

 

-----Oorspronkelijk = bericht-----
Van: Andy Shellam [mailto:andy@andycc.net]
Verzonden: dinsdag 4 juli = 2006 13:28
Aan: 'H.J. Sanders'
CC: = pgsql-admin@postgresql.org
Onderwerp: RE: [ADMIN] = FW: 2 instances

How are you connecting to = Postgres?

 

Note that you’ll always need = to give the port 5433 to connect to the second instance in any tool you use = (psql, pg_dump, other management utilities etc), otherwise you’ll always = connect to the “default” instance on = 5432.

 

Andy

 


From: pgsql-admin-owner@postgresql.org = [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of H.J. Sanders
Sent: 04 July 2006 12:22 = pm
To: = pgsql-admin@postgresql.org
Subject: [ADMIN] FW: 2 = instances

 

 

=


 

Hello.

 

=

I would like to run 2 instances of postgresql with 2 different data-directories: dir-a en = dir-b.

 

=

Looking trough the archives I came = to the next setup:

 

=

I created this 2 different = directories and 2 users each with a different PGDATA(dir-a and dir-b) in their = .profile

Using this 2 users i did twice = initdb and createdb xyz with the first user.

 

=

in postgresql.conf of the second directory I changed  the port to 5433 and also entered this port in /etc/services and started the second

postmaster, ps -f shows it is = running.

 

=

If I now want to create the same = database xyz in the second directory using the second user,

the database is already = there!

 

=

What am I = missing?

 

=

Many thanks

 

=

Henk Sander

 

=

 

=

 

=

 

=

!DSPAM:14,44aa651c256842130418775!

------=_NextPart_000_0042_01C69F75.F4301660--