On Thu, Apr 4, 2019 at 9:57 AM Antonin Houska <a...@cybertec.at> wrote: > I think I finally understand. Originally I thought the question is how to > compute correct page checksum while the hint bits can be changed w/o exclusive > lock on the buffer. Now I realize that it's more about *recovery*: if the hint > bit change is followed by a torn page write, the hint bit can get changed on > disk but the checksum might not get updated. The wrong checksum is detected > during recovery, but if XLOG does not contain the corresponding full page > image, we're not able to recover. > > And with encryption, the consequence is even worse because torn page write > causes not only wrong checksum of otherwise useful page, but really damaged > page.
Correct. > I'll enforce the FPW in the next version of the patch. Cool. I'm willing to put some effort into trying to get this into v13 if you're willing to keep hacking on it, but there's probably a fair amount to do and a year can go by in a hurry. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company