<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nixos/nixpkgs.git/pkgs/servers/sql/postgresql/default.nix, branch master</title>
<subtitle>Nix Packages collection</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/'/>
<entry>
<title>postgresql_13: drop as it's EOL</title>
<updated>2025-11-18T11:32:17+00:00</updated>
<author>
<name>Leona Maroni</name>
<email>dev@leona.is</email>
</author>
<published>2025-11-17T10:44:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=a3f56d583f378ed50b3ff5e31ea0286be4abeb05'/>
<id>a3f56d583f378ed50b3ff5e31ea0286be4abeb05</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>postgresql_18: init at 18beta1</title>
<updated>2025-07-05T09:52:42+00:00</updated>
<author>
<name>Kamil Monicz</name>
<email>kamil@monicz.dev</email>
</author>
<published>2025-05-29T03:57:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=6cdfc25ae47ecc37f8d96c839e384a67e64f44e8'/>
<id>6cdfc25ae47ecc37f8d96c839e384a67e64f44e8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>postgresql: always build with JIT enabled</title>
<updated>2025-04-05T18:00:13+00:00</updated>
<author>
<name>Wolfgang Walther</name>
<email>walther@technowledgy.de</email>
</author>
<published>2025-03-21T17:42:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=dd5fd6cc225c912f73bf38b338507cfa72daa1c8'/>
<id>dd5fd6cc225c912f73bf38b338507cfa72daa1c8</id>
<content type='text'>
This changes the build to always enable JIT - but to only enable it at
run-time, when required. This keeps the runtime closure small without
JIT, but allows enabling it without a rebuild. We can do this, because
JIT is actually built as a shared module, which is loaded at run-time.
We put it into a -jit output and only link it into the environment when
requested.

Under the hood, this uses withPackages and adds the "JIT package" -
thus, to be able to use withPackages on top of that, we also need to be
able to apply withPackages repeatedly.

This cuts down the number of NixOS tests in half, because we don't need
to run it for every version with and without JIT anymore. There really
is no point in running everything with llvmjit.so in place, when the
queries are not making use of it anyway.

Also, we only need to build each extension once and not twice, further
reducing the number of rebuilds required for PRs touching postgresql.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This changes the build to always enable JIT - but to only enable it at
run-time, when required. This keeps the runtime closure small without
JIT, but allows enabling it without a rebuild. We can do this, because
JIT is actually built as a shared module, which is loaded at run-time.
We put it into a -jit output and only link it into the environment when
requested.

Under the hood, this uses withPackages and adds the "JIT package" -
thus, to be able to use withPackages on top of that, we also need to be
able to apply withPackages repeatedly.

This cuts down the number of NixOS tests in half, because we don't need
to run it for every version with and without JIT anymore. There really
is no point in running everything with llvmjit.so in place, when the
queries are not making use of it anyway.

Also, we only need to build each extension once and not twice, further
reducing the number of rebuilds required for PRs touching postgresql.
</pre>
</div>
</content>
</entry>
<entry>
<title>postgresql: refactor `postgresqlVersions` attribute &amp; tests</title>
<updated>2025-01-26T20:58:57+00:00</updated>
<author>
<name>Maximilian Bosch</name>
<email>maximilian@mbosch.me</email>
</author>
<published>2025-01-26T12:10:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=eb96c8dc5b69f2838e3ff8e6ce6ba69956ada02c'/>
<id>eb96c8dc5b69f2838e3ff8e6ce6ba69956ada02c</id>
<content type='text'>
Every postgresql testcase essentially does the following things:

* Filter `postgresqlVersions` for server packages
* Filter postgresql server packages for suitable ones (i.e. extensions
  must support the given version)
* Generate an attribute-set of testcases

The first item became necessary in
7ab1e888334ddc2745b285e3df0b0efd5839d0f8 given that
`postgresql/default.nix` now exposes JIT and non-JIT servers AND a
`libpq` that is not suitable for the tests here.

This changes restructures this a little bit, i.e.:

* Having an attribute-set that contains a bunch of postgresql servers
  and a single client package seems odd (and the sole consumer of
  `postgresqlVersions` in nixpkgs, the test suite, has to take that into
  account). Hence, postgresql's default.nix now provides `libpq` (the client)
  and a `postgresqlVersions` attribute with all supported JIT and non-JIT
  variants of postgresql.

* Each test-case gets a third argument, a function called `genTests`:
  this function sets `recurseForDerivations = true;` and generates an
  attribute-set of tests for each postgresql version given a function
  that returns a testcase or multiple test-cases (`makeTestFor`). The
  argument to `makeTestFor` is a postgresql server package.

  This function also accepts a filter predicate that is passed against
  `filterAttrs` to remove postgresql server packages that are not
  suitable for the test (e.g. because the version isn't supported by the
  extension to test).

I checked by making sure that the `.drv` doesn't change on staging with
this change on top for postgresq, postgresql-jit,
postgresql-wal-receiver, postgresql-tls-client-cert, anonymizer, pgjwt,
pgvecto-rs, timescaledb, tsja and wal2json.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Every postgresql testcase essentially does the following things:

* Filter `postgresqlVersions` for server packages
* Filter postgresql server packages for suitable ones (i.e. extensions
  must support the given version)
* Generate an attribute-set of testcases

The first item became necessary in
7ab1e888334ddc2745b285e3df0b0efd5839d0f8 given that
`postgresql/default.nix` now exposes JIT and non-JIT servers AND a
`libpq` that is not suitable for the tests here.

This changes restructures this a little bit, i.e.:

* Having an attribute-set that contains a bunch of postgresql servers
  and a single client package seems odd (and the sole consumer of
  `postgresqlVersions` in nixpkgs, the test suite, has to take that into
  account). Hence, postgresql's default.nix now provides `libpq` (the client)
  and a `postgresqlVersions` attribute with all supported JIT and non-JIT
  variants of postgresql.

* Each test-case gets a third argument, a function called `genTests`:
  this function sets `recurseForDerivations = true;` and generates an
  attribute-set of tests for each postgresql version given a function
  that returns a testcase or multiple test-cases (`makeTestFor`). The
  argument to `makeTestFor` is a postgresql server package.

  This function also accepts a filter predicate that is passed against
  `filterAttrs` to remove postgresql server packages that are not
  suitable for the test (e.g. because the version isn't supported by the
  extension to test).

I checked by making sure that the `.drv` doesn't change on staging with
this change on top for postgresq, postgresql-jit,
postgresql-wal-receiver, postgresql-tls-client-cert, anonymizer, pgjwt,
pgvecto-rs, timescaledb, tsja and wal2json.
</pre>
</div>
</content>
</entry>
<entry>
<title>libpq: init at 17.2</title>
<updated>2025-01-19T11:49:21+00:00</updated>
<author>
<name>Wolfgang Walther</name>
<email>walther@technowledgy.de</email>
</author>
<published>2024-11-23T22:36:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=546ece569b66f3995839ffe87726177831aca72e'/>
<id>546ece569b66f3995839ffe87726177831aca72e</id>
<content type='text'>
Resolves #61580
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resolves #61580
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: format all inactive Nix files</title>
<updated>2024-12-10T19:27:17+00:00</updated>
<author>
<name>Silvan Mosberger</name>
<email>silvan.mosberger@tweag.io</email>
</author>
<published>2024-12-10T19:27:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=667d42c00d566e091e6b9a19b365099315d0e611'/>
<id>667d42c00d566e091e6b9a19b365099315d0e611</id>
<content type='text'>
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev 57b193d8ddeaf4f5219d2bae1d23b081e4906e57
    result/bin/apply-formatting $NIXPKGS_PATH
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev 57b193d8ddeaf4f5219d2bae1d23b081e4906e57
    result/bin/apply-formatting $NIXPKGS_PATH
</pre>
</div>
</content>
</entry>
<entry>
<title>postgresql_12: remove</title>
<updated>2024-11-15T08:17:06+00:00</updated>
<author>
<name>Maximilian Bosch</name>
<email>maximilian@mbosch.me</email>
</author>
<published>2024-11-02T15:52:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=0b3eef7441c4c8becc61d67004bd8d05c33922a1'/>
<id>0b3eef7441c4c8becc61d67004bd8d05c33922a1</id>
<content type='text'>
This will be EOL at the end of November, so there's little reason to
keep it in 24.11[1]. As discussed, we'd like to keep it for as long as
possible to make sure there's a state in nixpkgs that has the latest
minor of postgresql_12 available with the most recent CVEs fixed for
people who cannot upgrade[2].

This aspect has been made explicit in the manual now for the next .11
release.

During the discussions it has been brought up that if people just do
`services.postgresql.enable = true;` and let the code decide the
postgresql version based on `system.stateVersion`, there's a chance that
such EOL dates will be missed. To make this harder, a warning will now
be raised when using the stateVersion-condition and the oldest still
available major is selected.

Additionally regrouped the postgresql things in the release notes to
make sure these are all shown consecutively. Otherwise it's a little
hard to keep track of all the changes made to postgresql in 24.11.

[1] https://endoflife.date/postgresql
[2] https://github.com/NixOS/nixpkgs/pull/353158#issuecomment-2453056692
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will be EOL at the end of November, so there's little reason to
keep it in 24.11[1]. As discussed, we'd like to keep it for as long as
possible to make sure there's a state in nixpkgs that has the latest
minor of postgresql_12 available with the most recent CVEs fixed for
people who cannot upgrade[2].

This aspect has been made explicit in the manual now for the next .11
release.

During the discussions it has been brought up that if people just do
`services.postgresql.enable = true;` and let the code decide the
postgresql version based on `system.stateVersion`, there's a chance that
such EOL dates will be missed. To make this harder, a warning will now
be raised when using the stateVersion-condition and the oldest still
available major is selected.

Additionally regrouped the postgresql things in the release notes to
make sure these are all shown consecutively. Otherwise it's a little
hard to keep track of all the changes made to postgresql in 24.11.

[1] https://endoflife.date/postgresql
[2] https://github.com/NixOS/nixpkgs/pull/353158#issuecomment-2453056692
</pre>
</div>
</content>
</entry>
<entry>
<title>postgresql_17: init at 17.0</title>
<updated>2024-10-26T13:15:24+00:00</updated>
<author>
<name>Wolfgang Walther</name>
<email>walther@technowledgy.de</email>
</author>
<published>2024-09-28T19:36:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=4cc4534295812864ed8dab03537288fd3a3f3e5d'/>
<id>4cc4534295812864ed8dab03537288fd3a3f3e5d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>postgresql: add readme with eol-policy</title>
<updated>2024-06-14T07:38:23+00:00</updated>
<author>
<name>Wolfgang Walther</name>
<email>walther@technowledgy.de</email>
</author>
<published>2024-06-04T19:36:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=0487937af3e78f5e651716bf16ea6c4d8d783f70'/>
<id>0487937af3e78f5e651716bf16ea6c4d8d783f70</id>
<content type='text'>
This was discussed and agreed on in [1].

[1]: https://github.com/NixOS/nixpkgs/pull/310580#discussion_r1597284693
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was discussed and agreed on in [1].

[1]: https://github.com/NixOS/nixpkgs/pull/310580#discussion_r1597284693
</pre>
</div>
</content>
</entry>
<entry>
<title>postgresql: remove thisAttr argument by calling tests directly</title>
<updated>2024-04-04T06:41:17+00:00</updated>
<author>
<name>Wolfgang Walther</name>
<email>walther@technowledgy.de</email>
</author>
<published>2024-03-03T10:48:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=aea4ba847a8ebaa452424ce7654f5127e37efb17'/>
<id>aea4ba847a8ebaa452424ce7654f5127e37efb17</id>
<content type='text'>
Previously, it was not possible to run tests on an overridden derivation, because
the derivation under test was always pulled from pkgs.

With this change, the following will return the same test:

  postgresql_jit.tests

and

  (postgresql.override { jitSupport = true; }).tests
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, it was not possible to run tests on an overridden derivation, because
the derivation under test was always pulled from pkgs.

With this change, the following will return the same test:

  postgresql_jit.tests

and

  (postgresql.override { jitSupport = true; }).tests
</pre>
</div>
</content>
</entry>
</feed>
