Re: pg_checksums?

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_checksums?
Date: 2023-10-27 19:02:57
Message-ID: b9ae7181-70ec-4b7e-bf04-9dbb738a7f36@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/27/23 13:34, Paul Förster wrote:
> Hi,
>
> I have a few questions about pg_checksums.
>
> Long story short, checksums were disabled in our environment but are getting enabled now (again!) because of block corruptions which destroyed a few databases in a database cluster. And before you say "told you so", the decision to disable checksums was not mine. Some people just have to learn the hard way.
>
> Anyway, re-enabling data checksums creates a few questions:
>
> a) why isn't it possible to enable checksumming while a database cluster is up?

Data might be changing.

> b) why isn't it possible to check whether checksums are enabled or not?

(This is my tiny test instance.)

$ pg_controldata | grep checksum
Data page checksum version:           0

postgres=# show data_checksums;
 data_checksums
----------------
 off
(1 row)

> c) in a Patroni cluster consisting of a primary and a sync standby, is it safe to enable checksumming in the replica, then switch over and enable it in the ex-primary, i.e. now new replica, without any penalty? Or do I have to perform a reinit to really get them in sync again, though paronictl happily reports them to be in sync?
>
> d) how long does it take to enable checksums in general? Minimizing down-time is crucial. Does it depend on the database cluster size, or the number of files it uses, or what can be taken as a criterion to estimate then necessary down-time.
>
> Thanks in advance for your insights.
>
> Cheers
> Paul
>

--
Born in Arizona, moved to Babylonia.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Förster 2023-10-27 19:10:31 Re: pg_checksums?
Previous Message Paul Förster 2023-10-27 18:34:00 pg_checksums?