Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UZyPc-00038h-4Y for pgsql-admin@arkaria.postgresql.org; Wed, 08 May 2013 07:03:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UZyPb-0005ux-GY for pgsql-admin@arkaria.postgresql.org; Wed, 08 May 2013 07:03:39 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UZyPa-0005ur-AC for pgsql-admin@postgresql.org; Wed, 08 May 2013 07:03:38 +0000 Received: from adsltrust.ath.forthnet.gr ([194.219.204.174] helo=smadev.internal.net) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UZyPW-00050h-N7 for pgsql-admin@postgresql.org; Wed, 08 May 2013 07:03:37 +0000 X-Bogosity: No, tests=bogofilter Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.14.5/8.14.5) with ESMTP id r4873Wol058492; Wed, 8 May 2013 10:03:32 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: (from achill@localhost) by smadev.internal.net (8.14.5/8.14.5/Submit) id r4873VDP058491; Wed, 8 May 2013 10:03:31 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) X-Authentication-Warning: smadev.internal.net: achill set sender to achill@matrix.gatewaynet.com using -f From: Achilleas Mantzios To: pgsql-admin@postgresql.org Cc: Jim Mercer , Benjamin Krajmalnik Subject: Re: Installing multiple instances of Postgred on one FreeBSD server Date: Wed, 08 May 2013 10:03:30 +0300 Message-ID: <1608284.rQGoEjIzhB@smadev.internal.net> Organization: Dynacom Tankers Mgmt X-Face: "g.Z.Lx$T1ZMcQ%hC!e^E&tD,cT:"bTs45WM(,vUj@8QBz6}T'sn+EnZTzy`UVQ:&A=`_; f)V+K4z}rG5:(uu[b:WY'*`6F"ou-Or(q; u{#Gxx|MkO4E.vh@E}[#7Ytt"shtU>A&@CO` a|Wx]m_wRD,?4!'Ir1$4iis{/.WU<`#dhKI]g2w^!B[CvRJr+W|; -VS~QcL!s1"'??rct} ^=5Fa!W!{a}Jd:W%6,E[N\r-<)T'_N[~3fy9pF"b>-Yj^p}/2tPudP>I"$%w]"W4CIja6J Tajm}"8t`-hJlf2kRQ_V,eT_kN6KLG+~2mZ+cPX,p,xQN9QVR References: <2211439.EXVAIh2AgT@smadev.internal.net> <20130502125849.GA72269@reptiles.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Pretty informative Jim, thanx. Do you remember which version, when, by who, were these shortcomings (diffe= rent user, different port) resolved? At the time it seemed like a very hard thing to implement in the current st= atus of jails. So, to rephrase, did it take a major jail re-write to achieve the above? or= was it more on the hack-side? On =C3=90=C3=A5=C3=AC 02 =C3=8C=C3=A1=C3=80 2013 08:58:49 Jim Mercer wrote: > On Thu, May 02, 2013 at 10:10:51AM +0300, Achilleas Mantzios wrote: > > Hi, i was just lurking around, > > being previously interested in running pgsql in jail environment (must = have been some years back) > > i noticed that jails had issues with running many instances of postmast= er listening on the same port > > and with the same user (say e.g. postgres). So basically having cloned = jails running pgsql was not > > out of the box possible without tweaking either user or port. > > Being many years out of freebsd admin, has this been remedied by now? >=20 > yeah, those issues are no longer >=20 > the key thing is to have things running on the base machine set to listen > on a specific IP, rather than all interfaces, as many applications do by > default. >=20 > so, for instance, for ssh on the base system, you would do: >=20 > sshd_enable=3D"YES" > sshd_flags=3D"-o ListenAddress=3D120.121.122.123" >=20 > this will prevent it from listening for ssh on the ip you intend to use f= or > the jail. >=20 > and in the jail, you can leave it listen on all interfaces, since, in the > jail, it only has its own interface. >=20 > in the case of pgsql, the best way to do it is to not have pgsql installe= d=20 > on the base server, and only run it in a jail (or a couple jails, if you = are > looking to smooth the upgrade from one to the next). >=20 > if you want to run pgsql on the base server, then set: > listen_addresses =3D '120.121.122.123' > in postgresql.conf, and there will be no conflict of listeners. >=20 > it issue of users/uids is moot, since the jail is independent of the main= system. >=20 > assuming you configure the base system to listen only on its own IP, inst= alling > on the jail, is no different than installing on a normal system. >=20 > --jim >=20 > >=20 > > On ?????? 01 ?????? 2013 16:24:01 Jim Mercer wrote: > > > On Wed, May 01, 2013 at 02:21:44PM -0600, Benjamin Krajmalnik wrote: > > > > So essentially we would have to run jails on this - does that affect > > > > performance? > > >=20 > > > i would say minimal impact. > > >=20 > > > >=20 > > > >=20 > > > > -----Original Message----- > > > > From: Jim Mercer [mailto:jim@reptiles.org]=20 > > > > Sent: Wednesday, May 01, 2013 2:20 PM > > > > To: Benjamin Krajmalnik > > > > Cc: pgsql-admin@postgresql.org > > > > Subject: Re: [ADMIN] Installing multiple instances of Postgred on o= ne > > > > FreeBSD server > > > >=20 > > > > On Wed, May 01, 2013 at 01:58:21PM -0600, Benjamin Krajmalnik wrote: > > > > > I would like to install PG 9.2 on the same server and use Slony t= o=20 > > > > > replicate the databases, and once everything is up take the 9.0= =20 > > > > > cluster down. > > > >=20 > > > > allocate a new ip to the server. > > > > reconfigure/restart 9.0 to listen on the main IP (not "all" as defa= ult) > > > >=20 > > > > use ezjail to create a freebsd jail on thenew IP > > > >=20 > > > > install 9.2 in the jail > > > >=20 > > > > treat it them as two servers. > > > >=20 > > > > point clients at new ip. > > > >=20 > > > > once migrated, delete all 9.0 from the main server. > > > >=20 > > > > if you need to upgrade again, add another jail. > > > >=20 > > > > stop and delete the old jail whe the next upgrade is complete. > > > >=20 > > > > repeat as often as you want to upgrade. > > > >=20 > > > > i'm pretty sure this can be adapted to linux, but i forget what the= ir > > > > jail equivilent is. > > > >=20 > > > > the overhead is minimal > > > >=20 > > > >=20 > > > >=20 > > >=20 > > >=20 > > - > > Achilleas Mantzios > > IT DEV > > IT DEPT >=20 >=20 - Achilleas Mantzios IT DEV IT DEPT Dynacom Tankers Mgmt --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin