Re: [Patch] Checksums for SLRU files - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [Patch] Checksums for SLRU files
Date
Msg-id 20180802030549.2dphf7m7wsd4gdoe@alap3.anarazel.de
Whole thread Raw
In response to Re: [Patch] Checksums for SLRU files  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 2018-08-01 21:20:22 -0400, Alvaro Herrera wrote:
> On 2018-Aug-02, Thomas Munro wrote:
> 
> > PostgreSQL only requires atomic writes of 512 bytes (see
> > PG_CONTROL_MAX_SAFE_SIZE), the traditional sector size for disks made
> > approximately 1980-2010, though as far as I know spinning disks made
> > this decade use 4KB sectors, and for SSDs there is more variation.  I
> > suppose the theory for torn SLRU page safety today is that the
> > existing SLRU users all have fully independent values that don't cross
> > sector boundaries, so torn writes can't corrupt them.
> 
> Hmm, I wonder if this is true for multixact/members.  I think it's not
> true for either 4kB sectors nor for 512 byte sectors.

Hm, why not? Individual entries are 4bytes large and aligned, no? And as
we're solely appending (logicly if not physicly), that should be ok?

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Explain buffers wrong counter with parallel plans
Next
From: Andres Freund
Date:
Subject: Re: Explain buffers wrong counter with parallel plans