> On 22 Jun 2020, at 18:29, Robert Haas <robertmh...@gmail.com> wrote: > > On Mon, Jun 22, 2020 at 8:27 AM Daniel Gustafsson <dan...@yesql.se> wrote: >> Restartability is implemented by keeping state in pg_class. I opted for a >> bool >> which is cleared as the first step of checksum enable, since it offers fewer >> synchronization cornercases I think. > > Unless you take AccessExclusiveLock on the table, this probably needs > to be three-valued. Or maybe I am misunderstanding the design...
Sorry being a bit thick, can you elaborate which case you're thinking about? CREATE TABLE sets the attribute according to the value of data_checksums, and before enabling checksums (and before changing data_checksums to inprogress) the bgworker will update all relhaschecksums from true (if any) to false. Once the state is set to inprogress all new relations will set relhaschecksums to true. The attached v19 fixes a few doc issues I had missed. cheers ./daniel
online_checksums19.patch
Description: Binary data