No source specification for v18 available, yet, so they should be marked
broken instead of throwing random errors and breaking the
maintainer/update script.
I wondered if this is strictly needed and it turns out that except from
the postgresql_18 version failing with
pg_net> src/worker.c:20:14: error: no previous extern declaration for non-static variable 'worker_state' [-Werror,-Wmissing-variable-declarations]
pg_net> 20 | WorkerState *worker_state = NULL;
pg_net> | ^
pg_net> src/worker.c:20:1: note: declare 'static' if the variable is not intended to be used outside of this translation unit
pg_net> 20 | WorkerState *worker_state = NULL;
pg_net> | ^
pg_net> 1 error generated.
pg_net> make: *** [<builtin>: src/worker.o] Error 1
the package builds without it.
Previously, pg_config would report the paths of the underlying
postgresql derivation and not the paths of the buildEnv that
postgresql.withPackages creates.
That's a problem when users of pg_config use it to find PostgreSQL's
sharedir, in which they'd like to find the extensions added via
withPackages. Those are only linked into the created buildEnv, but not
available in the postgresql derivation.
By providing our own nix-support/pg_config.env file, we can swap out
those paths. We also do the same for the -man output, because this
output is linked into buildEnv as well. Other paths, which are not
available in the buildEnv environment, will still link to the original
postgresql derivation. Win-win!
timescaledb_toolkit never was a library to be preloaded anyway, it must
have found its way in there by accident. The extension is created via
CREATE EXTENSION, and that's enough for the test to pass.
The reason this fails is, because a recent commit changed the way the
timescaledb_toolkit.so library is created - it now carries a version
number, which makes PostgreSQL not able to find it.
Previously, the user of postgresqlTestHook would have needed to set
failureHook accordingly. However, this was not a clean solution, because
postgresqlStop would also run for configure or build failures, before
the server was even started. This gave odd errors from a failed shutdown
in the log.
Now postgresqlStop is only called when it makes sense - and whenever
postgresqlTestHook is used.