Re: Online enabling of checksums
Magnus Hagander <magnus@hagander.net>
From: Magnus Hagander <magnus@hagander.net>
To: Andres Freund <andres@anarazel.de>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>,
Tomas Vondra <tomas.vondra@2ndquadrant.com>, 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-06-26T11:45:49Z
Lists: pgsql-hackers
Attachments
- online_checksums12.patch (text/x-patch) patch
On Mon, Apr 9, 2018 at 7:22 PM, Magnus Hagander <magnus@hagander.net> wrote: > On Sat, Apr 7, 2018 at 6:22 PM, Andres Freund <andres@anarazel.de> wrote: > >> Hi, >> >> On 2018-04-07 08:57:03 +0200, Magnus Hagander wrote: >> > Note however that I'm sans-laptop until Sunday, so I will revert it >> then or >> > possibly Monday. >> >> I'll deactive the isolationtester tests until then. They've been >> intermittently broken for days now and prevent other tests from being >> exercised. >> > > Thanks. > > I've pushed the revert now, and left the pg_verify_checksums in place for > the time being. > > PFA an updated version of the patch for the next CF. We believe this one takes care of all the things pointed out so far. For this version, we "implemented" the MegaExpensiveRareMemoryBarrier() by simply requiring a restart of PostgreSQL to initiate the conversion background. That is definitely going to guarantee a memory barrier. It's certainly not ideal, but restarting the cluster is still a *lot* better than having to do the entire conversion offline. This can of course be improved upon in the future, but for now we stuck to the safe way. The concurrent create-database-from-one-that-had-no-checksums is handled by simply looping over the list of databases as long as new databases show up, and waiting for all open transactions to finish at the right moment to ensure there is no concurrently running one as we get the database list. Since the worker is now a regular background worker started from postmaster, the cost-delay parameters had to be made GUCs instead of function arguments. (And the more or less broken isolation tests are simply removed) -- Magnus Hagander Me: https://www.hagander.net/ <http://www.hagander.net/> Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>
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