Re: Online enabling of checksums
Tomas Vondra <tomas.vondra@2ndquadrant.com>
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: Magnus Hagander <magnus@hagander.net>,
Andrey Borodin <x4mmm@yandex-team.ru>, Heikki Linnakangas <hlinnaka@iki.fi>,
Daniel Gustafsson <daniel@yesql.se>,
Michael Banck <michael.banck@credativ.de>,
Robert Haas <robertmhaas@gmail.com>, Greg Stark <stark@mit.edu>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-04-06T18:18:00Z
Lists: pgsql-hackers
On 04/06/2018 08:13 PM, Andres Freund wrote: > On 2018-04-06 19:59:17 +0200, Tomas Vondra wrote: >> On 04/06/2018 07:46 PM, Andres Freund wrote: >>>> Sure. But what would that be? I can't think of anything. A process that >>>> modifies a buffer (or any other piece of shared state) without holding >>>> some sort of lock seems broken by default. >>> >>> You can quite possibly already *hold* a lock if it's not an exclusive >>> one. >>> >> >> Sure, but if you're holding the buffer lock when the checksum version is >> changed, then the checksumhelper is obviously not running yet. In which >> case it will update the checksum on the buffer later. > > The buffer content lock itself doesn't generally give any such > guarantee afaict, as it's required that the content lock is held in > shared mode during IO. ProcessSingleRelationFork() happens to use > exclusive mode (which could and possibly should be optimized), so > that's probably sufficient from that end though. > Yes. > I'm mainly disconcerted this isn't well discussed & documented. > Agreed, no argument here. -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Online enabling and disabling of data checksums
- f19c0eccae96 19 (unreleased) landed
-
Deactive flapping checksum isolation tests.
- bf75fe47e444 11.0 landed
-
Add support for coordinating record typmods among parallel workers.
- cc5f81366c36 11.0 cited