On 2014-09-11 11:39:12 -0400, Tom Lane wrote:
> Even on Intel, I'd wonder what unaligned accesses do to atomicity
> guarantees and suchlike.
They pretty much kill atomicity guarantees. Atomicity is guaranteed
while you're inside a cacheline, but not once you span them.
> This is not a big deal for row data storage,
> but we'd have to be careful about it if we were to back off alignment
> requirements for in-memory data structures such as latches and buffer
> headers.
Right. I don't think that's an option.
> Another fun thing you'd need to deal with is ensuring that the C structs
> we overlay onto catalog data rows still match up with the data layout
> rules.
Yea, this would require some nastyness in the bki generation, but it'd
probably doable to have different alignment for system catalogs.
> On the whole, I'm pretty darn skeptical that such an effort would repay
> itself. There are lots of more promising things to hack on.
I have no desire to hack on it, but I can understand the desire to
reduce the space overhead...
Greetings,
Andres Freund
-- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services