Re: [PoC] Improve dead tuple storage for lazy vacuum - Mailing list pgsql-hackers

From John Naylor
Subject Re: [PoC] Improve dead tuple storage for lazy vacuum
Date
Msg-id CANWCAZZDEjKDZbF+stUVwJ4auQf+Hhj2Skj5ty0ouUrJAQyDcw@mail.gmail.com
Whole thread Raw
In response to Re: [PoC] Improve dead tuple storage for lazy vacuum  (Andres Freund <andres@anarazel.de>)
Responses Re: [PoC] Improve dead tuple storage for lazy vacuum  (Pavel Borisov <pashkin.elfe@gmail.com>)
List pgsql-hackers
On Mon, Apr 8, 2024 at 2:07 AM Andres Freund <andres@anarazel.de> wrote:
>
> Looking at the code, the failure isn't suprising anymore:
>         char            data[MaxBlocktableEntrySize];
>         BlocktableEntry *page = (BlocktableEntry *) data;
>
> 'char' doesn't enforce any alignment, but you're storing a BlocktableEntry in
> a char[]. You can't just do that.  Look at how we do that for
> e.g. PGAlignedblock.
>
>
> With the attached minimal fix, the tests pass again.

Thanks, will push this shortly!



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Add bump memory context type and use it for tuplesorts
Next
From: Daniel Gustafsson
Date:
Subject: Re: Add bump memory context type and use it for tuplesorts