Thread: reinstall postgreSQL same version while server up and running possible under linux ?

reinstall postgreSQL same version while server up and running possible under linux ?

From
Gerhard Hintermayer
Date:
Sorry for posting this again, but my last post regarding this
problematic wasn't answered satisfyingly. (maybe I didn't find the
right words for my question ;-) )


is this (or a minor upgrade) a "safe" way to go under linux ? I'm on a
production system and I don't want to restart the DB server while the
factory is in production, but be sure that i'm prepared the next time
I'll do a restart. Of course I could wait for a factory shutdown on a
weekend, stop server, upgrade/reinstall and restart, but I'd prefer a
"on the fly upgrade".
(this is required due to a changed upstream library dependancy (major
perl upgrade) running gentoo)


regards
Gerhard

Re-sending to list since I forgot to include it on reply.

On 2010-11-02 13.59, Gerhard Hintermayer wrote:
 > Sorry for posting this again, but my last post regarding this
 > problematic wasn't answered satisfyingly. (maybe I didn't find the
 > right words for my question ;-) )
 >
 >
 > is this (or a minor upgrade) a "safe" way to go under linux ? I'm on a
 > production system and I don't want to restart the DB server while the
 > factory is in production, but be sure that i'm prepared the next time
 > I'll do a restart. Of course I could wait for a factory shutdown on a
 > weekend, stop server, upgrade/reinstall and restart, but I'd prefer a

You can install multiple versions of PostgreSQL on Gentoo. Portage calls
this SLOT[1].

 > "on the fly upgrade".

Depending on your definition here. You will need to restart your server
at some point.

The options you have is dump/restore[2] or pg_upgrade[3].

 > (this is required due to a changed upstream library dependancy (major
 > perl upgrade) running gentoo)

Not sure what you are saying here.

--
Regards,
Robert "roppert" Gravsjö

1. http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
2. http://www.postgresql.org/docs/9.0/interactive/migration.html
3. http://www.postgresql.org/docs/9.0/interactive/pgupgrade.html



On Tue, Nov 2, 2010 at 3:59 PM, Gerhard Hintermayer <gerhard.hintermayer@gmail.com> wrote:
Sorry for posting this again, but my last post regarding this
problematic wasn't answered satisfyingly. (maybe I didn't find the
right words for my question ;-) )


is this (or a minor upgrade) a "safe" way to go under linux ? I'm on a
production system and I don't want to restart the DB server while the
factory is in production, but be sure that i'm prepared the next time
I'll do a restart. Of course I could wait for a factory shutdown on a
weekend, stop server, upgrade/reinstall and restart, but I'd prefer a
"on the fly upgrade".
(this is required due to a changed upstream library dependancy (major
perl upgrade) running gentoo)

Yes, this should be safe. But make sure your new version is usable (or at least have all required libs linked).

--
Vladimir Rusinov
http://greenmice.info/

Re: reinstall postgreSQL same version while server up and running possible under linux ?

From
Gerhard Hintermayer
Date:
On Tue, Nov 2, 2010 at 4:06 PM, Robert Gravsjö <robert@blogg.se> wrote:
>
>
> On 2010-11-02 15.51, Gerhard Hintermayer wrote:
>>
>> Thanks, I know that. But slots are reserved per major version (i.e.
>> one for 8.1, one for 8.4, one for 9.0), but you don't have multiple
>> slots per minor version.
>
> Yes, you're right. I made the faulty assumption you were upgrading.
>
>>
>> On Tue, Nov 2, 2010 at 3:36 PM, Robert Gravsjö<robert@blogg.se>  wrote:
>>>
>>>
>>> On 2010-11-02 13.59, Gerhard Hintermayer wrote:
>>>>
>>>> Sorry for posting this again, but my last post regarding this
>>>> problematic wasn't answered satisfyingly. (maybe I didn't find the
>>>> right words for my question ;-) )
>>>>
>>>>
>>>> is this (or a minor upgrade) a "safe" way to go under linux ? I'm on a
>>>> production system and I don't want to restart the DB server while the
>>>> factory is in production, but be sure that i'm prepared the next time
>>>> I'll do a restart. Of course I could wait for a factory shutdown on a
>>>> weekend, stop server, upgrade/reinstall and restart, but I'd prefer a
>>>
>>> You can install multiple versions of PostgreSQL on Gentoo. Portage calls
>>> this SLOT[1].
>>>
>>>> "on the fly upgrade".
>>>
>>> Depending on your definition here. You will need to restart your server
>>> at
>>> some point.
>>
>> Of course, but the still running old binary has all (probable
>> obsoleted) .so's loaded, so the running copy should still work, even
>> though some of the linked libraries might have gone due to updates.
>> But I don't know what happens with newly spawned client process
>> (actually I even don't know if client processes are spawned or
>> exec'ed)
>
> As far as I know it's spawned.
>
So all spawned postgres processes will contain references to to
obsolete libraries, but as ther're already in memory, this shouldn't
make a problem. After I do a stop/start next time, the new
binaries/libraries  will take over and everything *should* be OK.
I tried this out on my backup server (reinstall the 8.1 slot with an
upgrade to the latest version), found no problems up to now, (still
running the old server version, new client apps do work) , but I'm
still hesitating to do this on my production system :-(

regards
Gerhard