From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | Michael Banck <michael(dot)banck(at)credativ(dot)de>, David Steele <david(at)pgmasters(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
Subject: | Re: Online verification of checksums |
Date: | 2018-09-26 15:30:31 |
Message-ID: | 20180926153031.GB4184@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greetings,
* Fabien COELHO (coelho(at)cri(dot)ensmp(dot)fr) wrote:
> >Note that a short read isn't an error and falls under the 'new' blocks
> >discussion above.
>
> I'm really unsure that a short read should really be coldly skipped:
>
> If the check is offline, then one file is in a very bad state, this is
> really a panic situation.
Why? Are we sure that's really something which can't ever happen, even
if the database was shutdown with 'immediate'? I don't think it can but
that's something to consider. In any case, my comments were
specifically thinking about it from an 'online' perspective.
> If the check is online, given that both postgres and the verify command
> interact with the same OS (?) and at the pg page level, I'm not sure in
> which situation there could be a partial block, because pg would only send
> full pages to the OS.
The OS doesn't operate at the same level that PG does- a single write in
PG could get blocked and scheduled off after having only copied half of
the 8k that PG sends. This isn't really debatable- we've seen it happen
and everything is operating perfectly correctly, it just happens that
you were able to get a read() at the same time a write() was happening
and that only part of the page had been updated at that point.
Thanks!
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Nikita Glukhov | 2018-09-26 15:37:54 | Re: [PATCH] kNN for btree |
Previous Message | Fabien COELHO | 2018-09-26 15:18:21 | Re: Online verification of checksums |