On Fri, Apr 09, 2021 at 04:28:25PM +0300, Yura Sokolov wrote: > Good day, hackers. > > I've got HP ProBook 640g8 with i7-1165g7. I've installed Ubuntu 20.04 LTS on > it > and started to play with PostgreSQL sources. > > Occasinally I found I'm not able to `make check` old Postgresql versions.
Do you mean that HEAD works consistently, but v9.6 and v10 sometimes work but sometimes fail ? > #5 0x0000557168678cf1 in systable_getnext > #6 0x0000557168b5651c in GetDatabaseTuple > #7 0x0000557168b574a4 in InitPostgres > #8 0x00005571689dcb7d in PostgresMain > #9 0x00005571688844d5 in main > > I've bisected between REL_11_0 and "Rename pg_rewind's copy_file_range()" > and > found 372728b0d49552641f0ea83d9d2e08817de038fa > > Replace our traditional initial-catalog-data format with a better > > design. > > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=372728b0d49552641f0ea83d9d2e08817de038fa > > This is first commit where `make check` doesn't fail during initdb on my > machine. Therefore 02f3e558f21c0fbec9f94d5de9ad34f321eb0e57 is the last one > where > `make check` fails. This doesn't make much sense or help much, since 372728b doesn't actually change the catalogs, or any .c file. > I've tried with gcc9, gcc10 and clang10. > I've configured either without parameters or with `CFLAGS=-O0 ./configure > --enable-debug`. You used make clean too, right ? I would also use --with-cassert, since it might catch problems you'd otherwise miss. If that doesn't expose anything, maybe try to #define USE_VALGRIND in src/include/pg_config_manual.h, and run with valgrind --trace-children=yes -- Justin