From: | Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Cc: | Jim Mercer <jim(at)reptiles(dot)org>, Benjamin Krajmalnik <kraj(at)servoyant(dot)com> |
Subject: | Re: Installing multiple instances of Postgred on one FreeBSD server |
Date: | 2013-05-08 07:03:30 |
Message-ID: | 1608284.rQGoEjIzhB@smadev.internal.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Pretty informative Jim, thanx.
Do you remember which version, when, by who, were these shortcomings (different user, different port) resolved?
At the time it seemed like a very hard thing to implement in the current status 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 Ðåì 02 ÌáÀ 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 postmaster 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?
>
> yeah, those issues are no longer
>
> 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.
>
> so, for instance, for ssh on the base system, you would do:
>
> sshd_enable="YES"
> sshd_flags="-o ListenAddress=120.121.122.123"
>
> this will prevent it from listening for ssh on the ip you intend to use for
> the jail.
>
> and in the jail, you can leave it listen on all interfaces, since, in the
> jail, it only has its own interface.
>
> in the case of pgsql, the best way to do it is to not have pgsql installed
> 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).
>
> if you want to run pgsql on the base server, then set:
> listen_addresses = '120.121.122.123'
> in postgresql.conf, and there will be no conflict of listeners.
>
> it issue of users/uids is moot, since the jail is independent of the main system.
>
> assuming you configure the base system to listen only on its own IP, installing
> on the jail, is no different than installing on a normal system.
>
> --jim
>
> >
> > 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?
> > >
> > > i would say minimal impact.
> > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Jim Mercer [mailto:jim(at)reptiles(dot)org]
> > > > Sent: Wednesday, May 01, 2013 2:20 PM
> > > > To: Benjamin Krajmalnik
> > > > Cc: pgsql-admin(at)postgresql(dot)org
> > > > Subject: Re: [ADMIN] Installing multiple instances of Postgred on one
> > > > FreeBSD server
> > > >
> > > > 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 to
> > > > > replicate the databases, and once everything is up take the 9.0
> > > > > cluster down.
> > > >
> > > > allocate a new ip to the server.
> > > > reconfigure/restart 9.0 to listen on the main IP (not "all" as default)
> > > >
> > > > use ezjail to create a freebsd jail on thenew IP
> > > >
> > > > install 9.2 in the jail
> > > >
> > > > treat it them as two servers.
> > > >
> > > > point clients at new ip.
> > > >
> > > > once migrated, delete all 9.0 from the main server.
> > > >
> > > > if you need to upgrade again, add another jail.
> > > >
> > > > stop and delete the old jail whe the next upgrade is complete.
> > > >
> > > > repeat as often as you want to upgrade.
> > > >
> > > > i'm pretty sure this can be adapted to linux, but i forget what their
> > > > jail equivilent is.
> > > >
> > > > the overhead is minimal
> > > >
> > > >
> > > >
> > >
> > >
> > -
> > Achilleas Mantzios
> > IT DEV
> > IT DEPT
>
>
-
Achilleas Mantzios
IT DEV
IT DEPT
Dynacom Tankers Mgmt
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2013-05-08 07:47:40 | Re: [SQL] Encrypting PGBouncer to Postgres DB connections |
Previous Message | Haifeng Liu | 2013-05-08 04:41:28 | How to prevent vacuum again and again on the unchanged tables? |