Re: best practice to patch a postgresql version? - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: best practice to patch a postgresql version?
Date
Msg-id 20221227221505.gmckzz4hll7d2dwn@hjp.at
Whole thread Raw
In response to Re: best practice to patch a postgresql version?  (qihua wu <staywithpin@gmail.com>)
List pgsql-general
On 2022-12-27 13:33:06 +0800, qihua wu wrote:
> But on a critical production database, we need to cut down the downtime as much
> as possible. If just remove a version, and then install a new version, both of
> them need a downtime.

I'm pretty sure that an `apt install` first replaces all the binaries
and only then restarts the database. But even if does shudown the
database before replacing the binaries and starts it afterwards, the
database is down maybe for a second or two.

> If we can install several versions on different location,
> switching version will have a shorter downtime: just stop the old version and
> start using the new binary, and we have no downtime when remove/install a new
> version.

I doubt that you are much faster.

And if your application can't tolerate a downtime of a few seconds I
hope you have some cluster solution with multiple active nodes running
already.

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment

pgsql-general by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: what is the solution like oracle DB's datafile
Next
From: jian he
Date:
Subject: https://wiki.postgresql.org/wiki/Working_with_Git link one link cannot open, another link is unrelated.