Re: [PoC] Improve dead tuple storage for lazy vacuum

From: Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>
To: John Naylor <johncnaylorls(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum
Date: 2024-04-08 12:22:28
Message-ID: CALT9ZEGUQf4U=AYxsndhHJvA=OjM21-4uxSFs6_J9ufgDHx53g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, John!

On Mon, 8 Apr 2024 at 03:13, John Naylor <johncnaylorls(at)gmail(dot)com> wrote:

> On Mon, Apr 8, 2024 at 2:07 AM Andres Freund <andres(at)anarazel(dot)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!
>
Buildfarm animal mylodon looks unhappy with this:

FAILED: src/backend/postgres_lib.a.p/access_common_tidstore.c.o
ccache clang-14 -Isrc/backend/postgres_lib.a.p -Isrc/include
-I../pgsql/src/include -I/usr/include/libxml2 -I/usr/include/security
-fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
-O2 -g -fno-strict-aliasing -fwrapv -D_GNU_SOURCE -Wmissing-prototypes
-Wpointer-arith -Werror=vla -Werror=unguarded-availability-new
-Wendif-labels -Wmissing-format-attribute -Wcast-function-type
-Wformat-security -Wdeclaration-after-statement
-Wno-unused-command-line-argument -Wno-compound-token-split-by-macro
-O1 -ggdb -g3 -fno-omit-frame-pointer -Wall -Wextra
-Wno-unused-parameter -Wno-sign-compare
-Wno-missing-field-initializers -Wno-array-bounds -std=c99
-Wc11-extensions -Werror=c11-extensions -fPIC -isystem
/usr/include/mit-krb5 -pthread -DBUILDING_DLL -MD -MQ
src/backend/postgres_lib.a.p/access_common_tidstore.c.o -MF
src/backend/postgres_lib.a.p/access_common_tidstore.c.o.d -o
src/backend/postgres_lib.a.p/access_common_tidstore.c.o -c
../pgsql/src/backend/access/common/tidstore.c
../pgsql/src/backend/access/common/tidstore.c:48:3: error: anonymous
structs are a C11 extension [-Werror,-Wc11-extensions]
struct
^

1 error generated.

Regards,
Pavel Borisov
Supabase

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2024-04-08 12:26:40 Re: [PoC] Improve dead tuple storage for lazy vacuum
Previous Message Kirill Reshke 2024-04-08 12:21:30 Re: Add last_commit_lsn to pg_stat_database