On 10/6/24 11:36, Dmitry Dolgov wrote:
> Hi,
>
> Based on the feedback in [1], here is my attempt at implementing system
> views for versions reporting. It adds pg_system_versions for showing
> things like core version, compiler, LLVM, etc, and pg_system_libraries
> for showing linked shared objects. I think everyone has ageed that the
> first was a good idea, where the second was only suggested -- after some
> thinking I find shared obects useful enough to include here as well.
>
> The main idea is to facilitate bug reporting. In particular, in many JIT
> related bug reports one of the first questions is often "which LLVM
> version is used?". Gathering such information is a manual process,
> mistakes could be made when veryfing llvm-config output or anywhere
> else. Having a system view for such purposes makes the process a bit
> more robust.
>
> The first three patches are essential for this purpose, the fourth one
> is somewhat independent and could be concidered in isolation. The output
> looks like this :
>
> =# select * from pg_system_versions;
> name | version | type
> ----------+--------------+--------------
> Arch | x86_64-linux | Compile Time
> ICU | 15.1 | Compile Time
> Core | 18devel | Compile Time
> Compiler | gcc-14.0.1 | Compile Time
> LLVM | 18.1.6 | Run Time
I'm not sure why ICU is "Compile Time" rather than "Run Time" when it is
not statically linked. Also, if we are going to include ICU here,
shouldn't we also include libc version?
> =# select * from pg_system_libraries;
> name
> -----------------------------
> /lib64/libkrb5.so.3
> /lib64/libz.so.1
> linux-vdso.so.1
> /lib64/libxml2.so.2
> [...]
>
> Any feedback is appreciated.
I think it would be nice to include a sha256 hash (or something similar)
of the libraries as well, so that they can be checked against known good
values.
--
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com