Thread: Running 2 versions of postgres on the same server at the same time ???

Running 2 versions of postgres on the same server at the same time ???

From
"Gauthier, Dave"
Date:

Hi:

 

I have v8.2.5 running on my server and serving my DB to my customers.  I also have v8.3.4.  I created a v8.3.4 instance (initdb) but haven’t started anything yet (no pg_ctl start yet).  I want to test v8.3.4 on the server while keeping v8.2.5 running and serving my customers at the same time.  Wil lthere be any problems if I start v8.3.4 while v8.2.5 is running? 

 

Thanks

-dave

Re: Running 2 versions of postgres on the same server at the same time ???

From
"Scott Marlowe"
Date:
On Tue, Sep 30, 2008 at 8:21 PM, Gauthier, Dave <dave.gauthier@intel.com> wrote:
> Hi:
>
> I have v8.2.5 running on my server and serving my DB to my customers.  I
> also have v8.3.4.  I created a v8.3.4 instance (initdb) but haven't started
> anything yet (no pg_ctl start yet).  I want to test v8.3.4 on the server
> while keeping v8.2.5 running and serving my customers at the same time.  Wil
> lthere be any problems if I start v8.3.4 while v8.2.5 is running?

I've got 8.1, 8.2 and 8.3 running on my laptop all at the same time.
If you're running debian it's super simple, the setup is fully
automagic.  Since you've already got it initdbed, all you need to do
is make sure it's set to come up on a different port and you're set.
Since the space around 5432 is pretty empty for reserved services,
it's typical to just use the next port and so on.  5433, 5434, 5435
and so on.

Also, you might have to increase your shm settings in your kernel to
provide enough shared memory for both instances.

It's actually a pretty common practice to install two versions for
migration purposes.

"Scott Marlowe" <scott.marlowe@gmail.com> writes:
> It's actually a pretty common practice to install two versions for
> migration purposes.

Also, all the core developers routinely run multiple versions for the
purpose of testing back-branch bug fixes.  The machine I'm typing this
on has, hm [ ... ps | grep ... ] ten postmasters running.  They don't
have enough shared memory apiece to perform super-well ... but the point
is that you can be entirely sure that it works.  Just install each
version in its own directory, point it at its own PGDATA directory,
and assign it its own port number.

            regards, tom lane