Re: System views for versions reporting
Dmitry Dolgov <9erthalion6@gmail.com>
From: Dmitry Dolgov <9erthalion6@gmail.com>
To: jian he <jian.universality@gmail.com>
Cc: Joe Conway <mail@joeconway.com>, pgsql-hackers@postgresql.org
Date: 2025-01-25T19:46:58Z
Lists: pgsql-hackers
Attachments
> On Thu, Jan 02, 2025 at 10:36:48AM GMT, jian he wrote: > hi. > https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F5318 > shows lots of failures, but it doesn't seem to tell you about doc build failure. Thanks for checking this out. Here is the updated version with applied changes. The tests were failing due to injection_points library apparently linking something twice, triggering a duplication error I didn't expect. Since apparently it can happen, I'm just overwriting duplicates. > --- a/src/include/utils/system_version.h > +++ b/src/include/utils/system_version.h > @@ -11,6 +11,7 @@ > #ifndef SYSTEM_VERSION_H > #define SYSTEM_VERSION_H > > +#include <gnu/libc-version.h> > #include <link.h> > > "gnu/libc-version.h" does not exist in the clang compiler? > will "link.h" everywhere? This one I don't follow, what do you mean by "link.h" everywhere? I think those two are coming from glibc and compiler independent. But it indeed makes sense to wrap them into __GLIBC__. > Currently, only a few rows are displayed for pg_system_versions. If I have > linked a dependency, I should be able to retrieve its version—for example, I > should be able to determine the version of zstd (i have linked the > zstd dependency). Maybe I'm missing something, but that's the plan -- pg_system_versions contains only some selected components, that have to be registered manually before showing up there. This of course means that it's hard to get all the linked libraries, but opens a possibility to show any kind of objects, not only what is linked. The actual list of versions is open for discussion of course, but showing everything is not feasible I think. For things like zstd pg_system_libraries is a better fit.