Re: pgsql: Don't trust unvalidated xl_tot_len.

Поиск
Список
Период
Сортировка
От Christoph Berg
Тема Re: pgsql: Don't trust unvalidated xl_tot_len.
Дата
Msg-id ZU_eD-JQCNA1tPSp@msg.df7cb.de
обсуждение исходный текст
Ответ на Re: pgsql: Don't trust unvalidated xl_tot_len.  (Thomas Munro <thomas.munro@gmail.com>)
Ответы Re: pgsql: Don't trust unvalidated xl_tot_len.  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
That's a lot of questions :). Let me try:

> In your chroot after it fails, can you please find xlog_internal.h
> somewhere under tmp_install and tell us the full path, and can you

./build/tmp_install/usr/include/postgresql/13/server/access/xlog_internal.h
./src/include/access/xlog_internal.h

> find pg_config (however many of them there might be, I'm a little
> confused on where and when Debian creates extra versioned variants)

That's only after testing and `make install`:
https://salsa.debian.org/postgresql/postgresql-common/-/blob/master/server/postgresql.mk#L219-225

> and tell us the full path,

./build/tmp_install/usr/lib/postgresql/13/bin/pg_config
./build/src/bin/pg_config/pg_config

> and also what --includedir-server prints,

$ ./build/tmp_install/usr/lib/postgresql/13/bin/pg_config --includedir-server
/usr/include/postgresql/13/server

> and can you also find regress_log_039_end_of_wal and confirm that it
> contains a complaint about being unable to open a file, not a
> complaint about being unable to execute pg_config?

$ cat ./build/src/test/recovery/tmp_check/log/regress_log_039_end_of_wal 
No such file or directory at /home/myon/projects/postgresql/debian/13/build/../src/test/perl/TestLib.pm line 655.


The 13-bullseye version of the package still has the "don't relocate
me" patch:


https://salsa.debian.org/postgresql/postgresql/-/blob/13-bullseye/debian/patches/50-per-version-dirs.patch?ref_type=heads

The PGBINDIR mangling is exactly what is breaking the use case now.
The commit that removed that bit in the 15 branch explains why it was
there:

https://salsa.debian.org/postgresql/postgresql/-/commit/a249c75e86fe8733b11c47630e4931c5c196e8da

I can (and should) do the change also in the other branches, but from
the 2022 discussion, I had the impression there were more reasons to
prefer static paths instead of calling pg_config from tmp_install.

After all, this seems to be the only 2nd case of actually calling
pg_config from tests if I'm grepping for the right things - the other
is check_pg_config() called from test/ssl/t/002_scram.pl. (I wonder
why that's not failing as well.)

Christoph



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: Don't trust unvalidated xl_tot_len.
Следующее
От: Matthias van de Meent
Дата:
Сообщение: Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan