pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Antonin Houska <ah@cybertec.at>
To: pgsql-hackers@postgresql.org
Subject: xl_heap_header alignment?
Date: Tue, 21 Jul 2020 19:45:37 +0200
Message-ID: <21643.1595353537@antos> (raw)

I don't quite understand this part of the comment of the xl_heap_header
structure:

 * NOTE: t_hoff could be recomputed, but we may as well store it because
 * it will come for free due to alignment considerations.

What are the alignment considerations? The WAL code does not appear to assume
any alignment, and therefore it uses memcpy() to copy the structure into a
local variable before accessing its fields. For example, heap_xlog_insert().

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com





view thread (11+ messages)  latest in thread

Message-ID: <21643.1595353537@antos>
Permalink:  ../21643.1595353537@antos/
Also on:    postgresql.org/message-id/21643.1595353537@antos

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: ah@cybertec.at
  Subject: Re: xl_heap_header alignment?
  In-Reply-To: <21643.1595353537@antos>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox