Re: best practice to patch a postgresql version?

From: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: best practice to patch a postgresql version?
Date: 2022-12-27 22:15:05
Message-ID: 20221227221505.gmckzz4hll7d2dwn@hjp.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Zheng Li 2022-12-27 22:32:59 Re: Support logical replication of DDLs
Previous Message Guillaume Lelarge 2022-12-27 15:43:42 Re: what is the solution like oracle DB's datafile