Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ postgres_major:

# Full version strings for each major version
postgres_release:
postgresorioledb-17: "17.6.0.099-orioledb"
postgres17: "17.6.1.142"
postgres15: "15.14.1.142"
postgresorioledb-17: "17.6.0.099-orioledb-ignore11"
postgres17: "17.6.1.104-backfill2"
postgres15: "15.14.1.142-ignore11"

# Non Postgres Extensions
pgbouncer_release: 1.25.1
Expand Down
5 changes: 4 additions & 1 deletion nix/packages/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{ self, inputs, ... }:
{
imports = [ ./postgres.nix ];
imports = [
./postgres.nix
./hotfix-pin.nix
];
perSystem =
{
inputs',
Expand Down
51 changes: 51 additions & 0 deletions nix/packages/hotfix-pin.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{ ... }:
{
perSystem =
{
self',
lib,
pkgs,
system,
...
}:
let
# Rebuild old release as an x86_64 linux AMI.
# Reuse old packages from the legacy flake to avoid version differences in postgresql and extensions.
postgres_old =
# tag 17.6.1.104
(builtins.getFlake "github:supabase/postgres/2997c92770dd85e6450e3e2c7d2c843f4717f492")
.packages.${system};

psql_old_with_latest_supautils =
let
oldPsql = postgres_old."psql_17/bin";
supautils = self'.legacyPackages.psql_17.exts.supautils;
in
pkgs.runCommand "${oldPsql.name}-supautils-${supautils.version}"
{
inherit (oldPsql) version;
nativeBuildInputs = [ pkgs.jq ];
}
''
cp -a ${oldPsql}/. $out/
chmod -R u+w $out
rm -f $out/lib/supautils${pkgs.stdenv.hostPlatform.extensions.sharedLibrary}
ln -s ${supautils}/lib/* $out/lib/

# update receipt
jq --arg version '${supautils.version}' \
'(.extensions[] | select(.name == "supautils") | .version) = $version' \
$out/receipt.json > $out/receipt.json.tmp
mv $out/receipt.json.tmp $out/receipt.json
'';
in
{
packages = lib.optionalAttrs pkgs.stdenv.isLinux {
"psql_17/bin" = lib.mkForce psql_old_with_latest_supautils;
"psql_17_cli/bin" = lib.mkForce postgres_old."psql_17_cli/bin";
postgresql_17_debug = lib.mkForce postgres_old.postgresql_17_debug;
postgresql_17_src = lib.mkForce postgres_old.postgresql_17_src;
supabase-groonga = lib.mkForce postgres_old.supabase-groonga;
};
};
}
Loading