Re: Online enabling of checksums - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Online enabling of checksums
Date
Msg-id 20180405212337.fjdxxuqucyrj464y@alap3.anarazel.de
Whole thread Raw
In response to Re: Online enabling of checksums  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Online enabling of checksums
List pgsql-hackers
Hi,

On 2018-04-05 22:06:36 +0200, Magnus Hagander wrote:
> I have now pushed this latest version with some minor text adjustments and
> a catversion bump.

Is there any sort of locking that guarantees that worker processes see
an up2date value of
DataChecksumsNeedWrite()/ControlFile->data_checksum_version? Afaict
there's not. So you can afaict end up with checksums being computed by
the worker, but concurrent writes missing them.  The window is going to
be at most one missed checksum per process (as the unlocking of the page
is a barrier) and is probably not easy to hit, but that's dangerous
enough.

Just plonking a barrier into DataChecksumsNeedWrite() etc is a
possibility, but it's also not free...

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Optional message to user when terminating/cancellingbackend
Next
From: Matheus de Oliveira
Date:
Subject: Re: [PATCH] btree_gin, add support for uuid, bool, name, bpchar andanyrange types