Re: Online enabling of checksums

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: Online enabling of checksums
Date: 2018-03-02 16:30:17
Message-ID: CA+TgmoZT5agzc6_5YU2Q4vuc95JjxSmJJ6aDZFFmtOnDJBYppA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 2, 2018 at 8:35 AM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> Do we ever make hintbit changes on the standby for example? If so, it would
> definitely cause problems. I didn't realize we did, actually...

We do not.

> I guess we could get there even if we don't by:
> * All checksums are correct
> * Checkums are disabled (which replicates)
> * Non-WAL logged change on the master, which updates checksum but does *not*
> replicate
> * Checksums re-enabled
> * Worker sees the checksum as correct, and thus does not force a full page
> write.
> * Worker completes and flips checksums on which replicates. At this point,
> if the replica reads the page, boom.

Exactly.

> I guess we have to remove that optimisation. It's definitely a bummer, but I
> don't think it's an absolute dealbreaker.

I don't disagree.

> We could say that we keep the optimisation if wal_level=minimal for example,
> because then we know there is no replica. But I doubt that's worth it?

I don't have a strong feeling about this.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Darafei Komяpa Praliaskouski 2018-03-02 16:30:48 All Taxi Services need Index Clustered Heap Append
Previous Message Mark Wong 2018-03-02 16:26:00 Re: [GSOC 18] Performance Farm Project