Re: Online checksums patch - once again

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Online checksums patch - once again
Date: 2020-06-25 09:43:00
Message-ID: F7AFCFCD-8F77-4546-8D42-C7F675A4B680@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 22 Jun 2020, at 18:29, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Mon, Jun 22, 2020 at 8:27 AM Daniel Gustafsson <daniel(at)yesql(dot)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

Attachment Content-Type Size
online_checksums19.patch application/octet-stream 98.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Devrim Gündüz 2020-06-25 10:00:55 CUBE_MAX_DIM
Previous Message David Rowley 2020-06-25 09:27:39 Re: Why forbid "INSERT INTO t () VALUES ();"