Skip to content

Conversation

@o-santi
Copy link

@o-santi o-santi commented Dec 23, 2025

What kind of change does this PR introduce?

Currently, switch-ext-version uses nixpkgs.postgresql, instead of the postgresql chosen inside nix/packages/postgres.nix.

To test for this, we can add builtins.trace postgresql.drvPath inside nix/packages/switch-ext-version.nix:

{
  coreutils,
  overlayfs-on-package,
  lib,
  postgresql,
  writeShellApplication,
}:
builtins.trace postgresql.drvPath (writeShellApplication {
  name = "switch-ext-version";
  runtimeInputs = [ coreutils ];
...

What is the current behavior?

$ nix eval .#psql_17/bin
trace: /nix/store/xb009c84shw6hlhv1rri66w6pwng03qi-postgresql-15.14.drv
«derivation /nix/store/0q2ffimhzn6rxnwskyr536p290l8fj8g-postgresql-and-plugins-17.6.drv»

postgresql has version 15.14, even though we chose psql_17.

What is the new behavior?

Correct one is chosen.

$ nix eval .#psql_17/bin
trace: /nix/store/4x4hqj7cp4zxp8b946wicpzdjb7y3fzw-postgresql-17.6.drv
«derivation /nix/store/0q2ffimhzn6rxnwskyr536p290l8fj8g-postgresql-and-plugins-17.6.drv»

Additional context

There are more stuff that I'd like to propose to change. For instance, there are IFDs for Cargo.lock that I believe would be pretty simple to change.

Summary by CodeRabbit

  • Refactor
    • Reorganized PostgreSQL extension packaging to unify how extensions are assembled and applied, improving maintainability and consistency across builds.
    • Introduced an intermediate package grouping to avoid redundant computation and simplify derivations; behavior is internal only and does not change any public interfaces or user-facing functionality.

✏️ Tip: You can customize this high-level summary in your review settings.

currently, `switch-ext-version` uses `nixpkgs.postgresql`, instead of
the `postgresql` chosen from outside.
@o-santi o-santi requested review from a team as code owners December 23, 2025 13:40
@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Walkthrough

A new extCallPackage wrapper (via pkgs.lib.callPackageWith) is added and used to construct PostgreSQL extension packages. Extension construction and the binary packaging flow are refactored to use a new postgres-pkgs binding that centralizes the computed extension set for both extension derivation and makePostgresBin.

Changes

Cohort / File(s) Summary
PostgreSQL extension packaging refactor
nix/packages/postgres.nix
Adds extCallPackage wrapper to apply per-extension behavior (inherit postgresql, switch-ext-version, overlayfs-on-package); replaces direct pkgs.callPackage usage with extCallPackage for entries in extensionsToUse; introduces postgres-pkgs binding and rewires makeOurPostgresPkgs and makePostgresBin to consume it instead of recalculating extension sets.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I wrap each extension with care and delight,
postgres-pkgs gathered, tidy and tight,
callPackageWith hops in to play,
binaries and ext sets now share one way,
CodeRabbit twitches—refactor feels right! 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: ensuring switch-ext-version uses the correct postgresql version selected in postgres.nix rather than a default nixpkgs version.
Description check ✅ Passed The description provides clear problem statement, before/after behavior with trace output examples, and context. It follows a logical structure explaining the issue and demonstrating the fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch use-correct-postgresql-switch-ext-version

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5701fab and 3f8b954.

📒 Files selected for processing (1)
  • nix/packages/postgres.nix
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: no packages to build (x86_64-linux)
🔇 Additional comments (3)
nix/packages/postgres.nix (3)

105-112: Excellent fix for the postgresql version propagation issue.

This wrapper correctly ensures that all extension packages and their dependencies (switch-ext-version, overlayfs-on-package) inherit the selected postgresql version from the local scope. The recursive binding is valid in Nix due to lazy evaluation and guarantees consistency throughout the extension build chain.


114-114: Correct application of the fix.

Switching from pkgs.callPackage to extCallPackage ensures all extensions are built with the correct postgresql version selected by the version parameter.


147-153: Good refactoring to avoid redundant computation.

Introducing the postgres-pkgs binding eliminates duplicate calls to makeOurPostgresPkgs version, improving efficiency and readability.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
nix/packages/postgres.nix (1)

144-150: Good refactoring; note partial duplication remains.

The introduction of the postgres-pkgs binding eliminates redundant computation within makePostgresBin. However, makeOurPostgresPkgsSet (line 117) still independently calls makeOurPostgresPkgs, so the full extension set is computed twice: once in makePostgresBin and once in makeOurPostgresPkgsSet (invoked from makePostgres at line 173).

This partial duplication is not a critical issue but could be optimized in a future refactor.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 431bbc6 and 5701fab.

📒 Files selected for processing (1)
  • nix/packages/postgres.nix
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: pg_net - Postgres 17 (aarch64-darwin)
  • GitHub Check: pg_partman - Postgres orioledb-17 (aarch64-darwin)
  • GitHub Check: plpgsql_check - Postgres 17 (aarch64-darwin)
  • GitHub Check: pg_cron - Postgres 17 (aarch64-darwin)
  • GitHub Check: pg_partman - Postgres 17 (aarch64-darwin)
  • GitHub Check: no packages to build (aarch64-linux)
🔇 Additional comments (2)
nix/packages/postgres.nix (2)

111-111: LGTM!

The change from pkgs.callPackage to extCallPackage correctly applies the fix to all extensions, ensuring they receive the correct postgresql version in their build environment.


105-109: Fix correctly uses recursive let binding to inject correct postgresql version.

The pattern is valid and commonly used in Nix—let bindings are lazy, allowing recursive references. callPackageWith injects the correct postgresql version into all extension modules' scope, resolving the original issue where switch-ext-version was using the nixpkgs default instead of the selected version. The mechanism works because when each extension is loaded, extCallPackage is already bound in the scope.

Copy link
Collaborator

@samrose samrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@o-santi thank you for this great work and analysis you did that led to these changes. We'll run some e2e tests on it, document on this PR and merge.

Copy link
Collaborator

@samrose samrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not actually asking for changes yet, but when I trigger a rebuild of wrappers package seems to nearly crash my computer. Just wanting to investigate that aspect before merge, since these changes don't trigger a full rebuild of rust extensions, and we need to make sure our CI can rebuild in a fault tolerant way. Update see comment below #1990 (review)

@samrose samrose self-requested a review December 23, 2025 15:55
Copy link
Collaborator

@samrose samrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restoring approval but we'll just document e2e test here prior to merge

@LGUG2Z
Copy link

LGUG2Z commented Dec 23, 2025

Will run the smoke tests on this branch and report back

@LGUG2Z
Copy link

LGUG2Z commented Dec 23, 2025

The engine smoke scenario across the 15 17 17-oriole matrix which runs all the SQL tests in nix/tests passed

❯ ./scripts/test-postgres-engines-with-smoke.sh https://github.com/supabase/postgres/pull/1990

============================================================
Supadev PostgreSQL Engine Smoke Test Suite
============================================================
[INFO] Testing PostgresEngines: 15 17 17-oriole
[INFO] Using region: us-east-1
[INFO] Project prefix: supadev-engine-smoke-1766512097
[INFO] Cache directory: /Users/lgug2z/.cache/supadev/postgres
[INFO] GitHub PR URL: https://github.com/supabase/postgres/pull/1990

[STEP] Resolving postgres commit hash...
[SUCCESS] Using postgres commit: 3f8b9545a69b641b41a6d078e7963fdcb0d7fc16
[STEP] Cloning supabase/postgres repo (commit 3f8b9545)...
[SUCCESS] Postgres repo cached at 3f8b9545
[INFO] Found 62 SQL test files


============================================================
Testing PostgreSQL Engine: 15
============================================================
[INFO] Project name: supadev-engine-smoke-1766512097-pg15
[INFO] Region: us-east-1
[INFO] Postgres commit: 3f8b9545
[INFO] Start time: 2025-12-23 09:48:29
[STEP] Resolving version from PR for engine 15...
[SUCCESS] Resolved version: 15.14.1.066
[STEP] Creating project with PostgresEngine 15...
INSERT 0 0
UPDATE 1
            version            |  region   |   provider_image_id   | release_channel | postgres_engine
-------------------------------+-----------+-----------------------+-----------------+-----------------
 supabase-postgres-15.14.1.066 | us-east-1 | ami-0ff08834e798a977e | ga              | 15
(1 row)


Creating project on release channel "internal" with version "15.14.1.066"
Project URL: http://localhost:8082/project/unrmigulztlhwljzxdws
Admin URL: http://localhost:4000/projects?identifier=unrmigulztlhwljzxdws
Database status is not yet available, waiting...
Database status is currently UNKNOWN, waiting...
Database status is currently COMING_UP, waiting...
Database status is currently COMING_UP, waiting...
Database status is currently COMING_UP, waiting...
Database status is now ACTIVE_HEALTHY
[SUCCESS] Project supadev-engine-smoke-1766512097-pg15 created and reached ACTIVE_HEALTHY status
[INFO] Time to ACTIVE_HEALTHY: 253 seconds
[INFO] Sleeping for 10 seconds before checking project health
[STEP] Checking project health for supadev-engine-smoke-1766512097-pg15...
Waiting for all project components to become healthy, 5 retries remaining. Retrying in 2 seconds...
Waiting for all project components to become healthy, 4 retries remaining. Retrying in 4 seconds...
Waiting for all project components to become healthy, 3 retries remaining. Retrying in 8 seconds...
[
  {
    "name": "PostgREST",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "db_schema": "public,graphql_public"
    }
  },
  {
    "name": "Auth",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "description": "GoTrue is a user registration and authentication API",
      "name": "GoTrue",
      "version": "v2.184.0"
    }
  },
  {
    "name": "Storage",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Realtime",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "connected_cluster": 0,
      "db_connected": false,
      "healthy": true,
      "node": "realtime@2600:1f14:2de3:6d00:845:3edb:f6ce:3436",
      "region": "us-west-2"
    }
  },
  {
    "name": "Postgres (Admin)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Postgres (User)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Supavisor (TXN)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "PgBouncer",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  }
]
[STEP] Printing project information for supadev-engine-smoke-1766512097-pg15
{
  "cloud_provider": "AWS",
  "db_host": "db.unrmigulztlhwljzxdws.supabase.red",
  "id": 40,
  "inserted_at": "2025-12-23T17:48:31.622012",
  "name": "supadev-engine-smoke-1766512097-pg15",
  "organization_id": 1,
  "ref": "unrmigulztlhwljzxdws",
  "region": "us-east-1",
  "status": "ACTIVE_HEALTHY",
  "subscription_id": "Avx7DALGCeGDjvVm",
  "connectionString": "U2FsdGVkX1/rfMX8YLXywcIeA7a7WOwnsrrlZVVekkApqNMfRrf0Eh1lSc3ypf7/gVFX273rocuhwcR1qFzbqkRQiZAZ6Cr+gFmBckLhyoJoZK8ddNvd0RnTgBPnO2aFFtykPVow3nVShn37eST5Atu70QzSOKb5VkN60ViuFewoGAN87kRIb6jdjUuTMoWw",
  "restUrl": "https://unrmigulztlhwljzxdws.supabase.red/rest/v1/",
  "volumeSizeGb": 8,
  "maxDatabasePreprovisionGb": null,
  "lastDatabaseResizeAt": null,
  "is_branch_enabled": false,
  "is_physical_backups_enabled": false,
  "infra_compute_size": "nano",
  "dbVersion": "15.14.1.066"
}

============================================================
Executing SQL tests (engine: 15)
============================================================
[STEP] Loading prime.sql to initialize extensions...
[SUCCESS] Extensions initialized
[STEP] Executing: auth (nix/tests/sql/auth.sql)
[SUCCESS] auth
[STEP] Executing: docs-array-test (nix/tests/sql/docs-array-test.sql)
[SUCCESS] docs-array-test
[STEP] Executing: docs-cascades-deletes (nix/tests/sql/docs-cascades-deletes.sql)
[SUCCESS] docs-cascades-deletes
[STEP] Executing: docs-connections (nix/tests/sql/docs-connections.sql)
[SUCCESS] docs-connections
[STEP] Executing: docs-enums (nix/tests/sql/docs-enums.sql)
[SUCCESS] docs-enums
[SUCCESS] docs-full-text-searcht-search (nix/tests/sql/docs-full-text-search.sql)
[STEP] Executing: docs-functions (nix/tests/sql/docs-functions.sql)
[SUCCESS] docs-functions
[STEP] Executing: docs-indexes (nix/tests/sql/docs-indexes.sql)
[SUCCESS] docs-indexes
[STEP] Executing: docs-json (nix/tests/sql/docs-json.sql)
[SUCCESS] docs-json
[STEP] Executing: docs-partitioning (nix/tests/sql/docs-partitioning.sql)
[SUCCESS] docs-partitioning
[STEP] Executing: docs-tables-and-data (nix/tests/sql/docs-tables-and-data.sql)
[SUCCESS] docs-tables-and-data
[STEP] Executing: docs-triggers (nix/tests/sql/docs-triggers.sql)
[SUCCESS] docs-triggers
[STEP] Executing: docs-webhooks (nix/tests/sql/docs-webhooks.sql)
[SUCCESS] docs-webhooks
[STEP] Executing: enable_tracking (nix/tests/sql/enable_tracking.sql)
[SUCCESS] enable_tracking
[STEP] Executing: evtrigs (nix/tests/sql/evtrigs.sql)
[SUCCESS] evtrigs
[STEP] Executing: extensions_schema (nix/tests/sql/extensions_schema.sql)
[SUCCESS] extensions_schema
[STEP] Executing: http (nix/tests/sql/http.sql)
[SUCCESS] http
[STEP] Executing: hypopg (nix/tests/sql/hypopg.sql)
[SUCCESS] hypopg
[STEP] Executing: index_advisor (nix/tests/sql/index_advisor.sql)
[SUCCESS] index_advisor
[STEP] Executing: pg-safeupdate (nix/tests/sql/pg-safeupdate.sql)
[SUCCESS] pg-safeupdate
[STEP] Executing: pg_graphql (nix/tests/sql/pg_graphql.sql)
[SUCCESS] pg_graphql
[STEP] Executing: pg_hashids (nix/tests/sql/pg_hashids.sql)
[SUCCESS] pg_hashids
[STEP] Executing: pg_jsonschema (nix/tests/sql/pg_jsonschema.sql)
[SUCCESS] pg_jsonschema
[STEP] Executing: pg_net (nix/tests/sql/pg_net.sql)
[SUCCESS] pg_net
[STEP] Executing: pg_partman (nix/tests/sql/pg_partman.sql)
[SUCCESS] pg_partman
[STEP] Executing: pg_plan_filter (nix/tests/sql/pg_plan_filter.sql)
[SUCCESS] pg_plan_filter
[STEP] Executing: pg_repack (nix/tests/sql/pg_repack.sql)
[SUCCESS] pg_repack
[STEP] Executing: pg_tle (nix/tests/sql/pg_tle.sql)
[SUCCESS] pg_tle
[STEP] Executing: pgaudit (nix/tests/sql/pgaudit.sql)
[SUCCESS] pgaudit
[STEP] Executing: pgbouncer (nix/tests/sql/pgbouncer.sql)
[SUCCESS] pgbouncer
[STEP] Executing: pgmq (nix/tests/sql/pgmq.sql)
[SUCCESS] pgmq
[STEP] Executing: pgroonga (nix/tests/sql/pgroonga.sql)
[SUCCESS] pgroonga
[STEP] Executing: pgrouting (nix/tests/sql/pgrouting.sql)
[SUCCESS] pgrouting
[STEP] Executing: pgsodium (nix/tests/sql/pgsodium.sql)
[SUCCESS] pgsodium
[STEP] Executing: pgtap (nix/tests/sql/pgtap.sql)
[SUCCESS] pgtap
[STEP] Executing: plpgsql-check (nix/tests/sql/plpgsql-check.sql)
[SUCCESS] plpgsql-check
[STEP] Executing: postgis (nix/tests/sql/postgis.sql)
[SUCCESS] postgis
[STEP] Executing: postgres_fdw (nix/tests/sql/postgres_fdw.sql)
[SUCCESS] postgres_fdw
[STEP] Executing: realtime (nix/tests/sql/realtime.sql)
[SUCCESS] realtime
[STEP] Executing: roles (nix/tests/sql/roles.sql)
[SUCCESS] roles
[STEP] Executing: security (nix/tests/sql/security.sql)
[SUCCESS] security
[STEP] Executing: storage (nix/tests/sql/storage.sql)
[SUCCESS] storage
[STEP] Executing: vault (nix/tests/sql/vault.sql)
[SUCCESS] vault
[STEP] Executing: wal2json (nix/tests/sql/wal2json.sql)
[SUCCESS] wal2json
[STEP] Executing: z_15_ext_interface (nix/tests/sql/z_15_ext_interface.sql)
[SUCCESS] z_15_ext_interface
[STEP] Executing: z_15_pg_stat_monitor (nix/tests/sql/z_15_pg_stat_monitor.sql)
[SUCCESS] z_15_pg_stat_monitor
[STEP] Executing: z_15_pgjwt (nix/tests/sql/z_15_pgjwt.sql)
[SUCCESS] z_15_pgjwt
[STEP] Executing: z_15_pgvector (nix/tests/sql/z_15_pgvector.sql)
[SUCCESS] z_15_pgvector
[STEP] Executing: z_15_plv8 (nix/tests/sql/z_15_plv8.sql)
[SUCCESS] z_15_plv8
[STEP] Executing: z_15_roles (nix/tests/sql/z_15_roles.sql)
[SUCCESS] z_15_roles
[STEP] Executing: z_15_rum (nix/tests/sql/z_15_rum.sql)
[SUCCESS] z_15_rum
[STEP] Executing: z_15_timescale (nix/tests/sql/z_15_timescale.sql)
[SUCCESS] z_15_timescale
[STEP] Executing: z_15_unhype_timescale_to_partman (nix/tests/sql/z_15_unhype_timescale_to_partman.sql)
[SUCCESS] z_15_unhype_timescale_to_partman
[SUCCESS] All SQL tests executed
[STEP] Deleting project supadev-engine-smoke-1766512097-pg15...
Project deleted
[SUCCESS] Project supadev-engine-smoke-1766512097-pg15 deleted successfully
[SUCCESS] PostgresEngine 15 test completed successfully
[INFO] Total test duration: 510 seconds


============================================================
Testing PostgreSQL Engine: 17
============================================================
[INFO] Project name: supadev-engine-smoke-1766512097-pg17
[INFO] Region: us-east-1
[INFO] Postgres commit: 3f8b9545
[INFO] Start time: 2025-12-23 09:56:59
[STEP] Resolving version from PR for engine 17...
[SUCCESS] Resolved version: 17.6.1.066
[STEP] Creating project with PostgresEngine 17...
INSERT 0 0
UPDATE 1
           version            |  region   |   provider_image_id   | release_channel | postgres_engine
------------------------------+-----------+-----------------------+-----------------+-----------------
 supabase-postgres-17.6.1.066 | us-east-1 | ami-0dcc0d00c5464166b | ga              | 17
(1 row)


Creating project on release channel "internal" with version "17.6.1.066"
Project URL: http://localhost:8082/project/ybqtiiltqachcssxyony
Admin URL: http://localhost:4000/projects?identifier=ybqtiiltqachcssxyony
Database status is not yet available, waiting...
Database status is currently COMING_UP, waiting...
Database status is currently COMING_UP, waiting...
Database status is currently COMING_UP, waiting...
Database status is currently COMING_UP, waiting...
Database status is now ACTIVE_HEALTHY
[SUCCESS] Project supadev-engine-smoke-1766512097-pg17 created and reached ACTIVE_HEALTHY status
[INFO] Time to ACTIVE_HEALTHY: 253 seconds
[INFO] Sleeping for 10 seconds before checking project health
[STEP] Checking project health for supadev-engine-smoke-1766512097-pg17...
Waiting for all project components to become healthy, 5 retries remaining. Retrying in 2 seconds...
Waiting for all project components to become healthy, 4 retries remaining. Retrying in 4 seconds...
[
  {
    "name": "PostgREST",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "db_schema": "public,graphql_public"
    }
  },
  {
    "name": "Auth",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "description": "GoTrue is a user registration and authentication API",
      "name": "GoTrue",
      "version": "v2.184.0"
    }
  },
  {
    "name": "Storage",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Realtime",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "connected_cluster": 0,
      "db_connected": false,
      "healthy": true,
      "node": "realtime@2600:1f14:2de3:6d00:845:3edb:f6ce:3436",
      "region": "us-west-2"
    }
  },
  {
    "name": "Postgres (Admin)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Postgres (User)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Supavisor (TXN)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "PgBouncer",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  }
]
[STEP] Printing project information for supadev-engine-smoke-1766512097-pg17
{
  "cloud_provider": "AWS",
  "db_host": "db.ybqtiiltqachcssxyony.supabase.red",
  "id": 41,
  "inserted_at": "2025-12-23T17:57:01.898983",
  "name": "supadev-engine-smoke-1766512097-pg17",
  "organization_id": 1,
  "ref": "ybqtiiltqachcssxyony",
  "region": "us-east-1",
  "status": "ACTIVE_HEALTHY",
  "subscription_id": "Avx7DALGCeGDjvVm",
  "connectionString": "U2FsdGVkX1+gP29CDnMmZGFeqL+RzNf8tRhpNLiXilGd57EK0jKbll15D7lFSxJiia6ABOhATGkOeFoFjN5Kb738/RGfCVCfkue/FIH2zzqWeqdP2b7Q43s7tKyDpGBMH190p9mYIKZktLOFtPF6TdiYyVZ6gGprlNDg0T4kUt1ePXQiCWcjuh3C9C0n38io",
  "restUrl": "https://ybqtiiltqachcssxyony.supabase.red/rest/v1/",
  "volumeSizeGb": 8,
  "maxDatabasePreprovisionGb": null,
  "lastDatabaseResizeAt": null,
  "is_branch_enabled": false,
  "is_physical_backups_enabled": false,
  "infra_compute_size": "nano",
  "dbVersion": "17.6.1.066"
}

============================================================
Executing SQL tests (engine: 17)
============================================================
[STEP] Loading prime.sql to initialize extensions...
[SUCCESS] Extensions initialized
[STEP] Executing: auth (nix/tests/sql/auth.sql)
[SUCCESS] auth
[STEP] Executing: docs-array-test (nix/tests/sql/docs-array-test.sql)
[SUCCESS] docs-array-test
[STEP] Executing: docs-cascades-deletes (nix/tests/sql/docs-cascades-deletes.sql)
[SUCCESS] docs-cascades-deletes
[STEP] Executing: docs-connections (nix/tests/sql/docs-connections.sql)
[SUCCESS] docs-connections
[STEP] Executing: docs-enums (nix/tests/sql/docs-enums.sql)
[SUCCESS] docs-enums
[STEP] Executing: docs-full-text-search (nix/tests/sql/docs-full-text-search.sql)
[SUCCESS] docs-full-text-search
[STEP] Executing: docs-functions (nix/tests/sql/docs-functions.sql)
[SUCCESS] docs-functions
[STEP] Executing: docs-indexes (nix/tests/sql/docs-indexes.sql)
[SUCCESS] docs-indexes
[STEP] Executing: docs-json (nix/tests/sql/docs-json.sql)
[SUCCESS] docs-json
[STEP] Executing: docs-partitioning (nix/tests/sql/docs-partitioning.sql)
[SUCCESS] docs-partitioning
[STEP] Executing: docs-tables-and-data (nix/tests/sql/docs-tables-and-data.sql)
[SUCCESS] docs-tables-and-data
[STEP] Executing: docs-triggers (nix/tests/sql/docs-triggers.sql)
[SUCCESS] docs-triggers
[STEP] Executing: docs-webhooks (nix/tests/sql/docs-webhooks.sql)
[SUCCESS] docs-webhooks
[STEP] Executing: enable_tracking (nix/tests/sql/enable_tracking.sql)
[SUCCESS] enable_tracking
[STEP] Executing: evtrigs (nix/tests/sql/evtrigs.sql)
[SUCCESS] evtrigs
[STEP] Executing: extensions_schema (nix/tests/sql/extensions_schema.sql)
[SUCCESS] extensions_schema
[STEP] Executing: http (nix/tests/sql/http.sql)
[SUCCESS] http
[STEP] Executing: hypopg (nix/tests/sql/hypopg.sql)
[SUCCESS] hypopg
[STEP] Executing: index_advisor (nix/tests/sql/index_advisor.sql)
[SUCCESS] index_advisor
[STEP] Executing: pg-safeupdate (nix/tests/sql/pg-safeupdate.sql)
[SUCCESS] pg-safeupdate
[STEP] Executing: pg_graphql (nix/tests/sql/pg_graphql.sql)
[SUCCESS] pg_graphql
[STEP] Executing: pg_hashids (nix/tests/sql/pg_hashids.sql)
[SUCCESS] pg_hashids
[STEP] Executing: pg_jsonschema (nix/tests/sql/pg_jsonschema.sql)
[SUCCESS] pg_jsonschema
[STEP] Executing: pg_net (nix/tests/sql/pg_net.sql)
[SUCCESS] pg_net
[STEP] Executing: pg_partman (nix/tests/sql/pg_partman.sql)
[SUCCESS] pg_partman
[STEP] Executing: pg_plan_filter (nix/tests/sql/pg_plan_filter.sql)
[SUCCESS] pg_plan_filter
[STEP] Executing: pg_repack (nix/tests/sql/pg_repack.sql)
[SUCCESS] pg_repack
[STEP] Executing: pg_tle (nix/tests/sql/pg_tle.sql)
[SUCCESS] pg_tle
[STEP] Executing: pgaudit (nix/tests/sql/pgaudit.sql)
[SUCCESS] pgaudit
[STEP] Executing: pgbouncer (nix/tests/sql/pgbouncer.sql)
[SUCCESS] pgbouncer
[STEP] Executing: pgmq (nix/tests/sql/pgmq.sql)
[SUCCESS] pgmq
[STEP] Executing: pgroonga (nix/tests/sql/pgroonga.sql)
[SUCCESS] pgroonga
[STEP] Executing: pgrouting (nix/tests/sql/pgrouting.sql)
[SUCCESS] pgrouting
[STEP] Executing: pgsodium (nix/tests/sql/pgsodium.sql)
[SUCCESS] pgsodium
[STEP] Executing: pgtap (nix/tests/sql/pgtap.sql)
[SUCCESS] pgtap
[STEP] Executing: plpgsql-check (nix/tests/sql/plpgsql-check.sql)
[SUCCESS] plpgsql-check
[STEP] Executing: postgis (nix/tests/sql/postgis.sql)
[SUCCESS] postgis
[STEP] Executing: postgres_fdw (nix/tests/sql/postgres_fdw.sql)
[SUCCESS] postgres_fdw
[STEP] Executing: realtime (nix/tests/sql/realtime.sql)
[SUCCESS] realtime
[STEP] Executing: roles (nix/tests/sql/roles.sql)
[SUCCESS] roles
[STEP] Executing: security (nix/tests/sql/security.sql)
[SUCCESS] security
[STEP] Executing: storage (nix/tests/sql/storage.sql)
[SUCCESS] storage
[STEP] Executing: vault (nix/tests/sql/vault.sql)
[SUCCESS] vault
[STEP] Executing: wal2json (nix/tests/sql/wal2json.sql)
[SUCCESS] wal2json
[STEP] Executing: z_17_ext_interface (nix/tests/sql/z_17_ext_interface.sql)
[SUCCESS] z_17_ext_interface
[STEP] Executing: z_17_pg_stat_monitor (nix/tests/sql/z_17_pg_stat_monitor.sql)
[SUCCESS] z_17_pg_stat_monitor
[STEP] Executing: z_17_pgvector (nix/tests/sql/z_17_pgvector.sql)
[SUCCESS] z_17_pgvector
[STEP] Executing: z_17_roles (nix/tests/sql/z_17_roles.sql)
[SUCCESS] z_17_roles
[STEP] Executing: z_17_rum (nix/tests/sql/z_17_rum.sql)
[SUCCESS] z_17_rum
[SUCCESS] All SQL tests executed
[STEP] Deleting project supadev-engine-smoke-1766512097-pg17...
Project deleted
[SUCCESS] Project supadev-engine-smoke-1766512097-pg17 deleted successfully
[SUCCESS] PostgresEngine 17 test completed successfully
[INFO] Total test duration: 438 seconds


============================================================
Testing PostgreSQL Engine: 17-oriole
============================================================
[INFO] Project name: supadev-engine-smoke-1766512097-pg17_oriole
[INFO] Region: us-east-1
[INFO] Postgres commit: 3f8b9545
[INFO] Start time: 2025-12-23 10:04:17
[STEP] Resolving version from PR for engine 17-oriole...
[SUCCESS] Resolved version: 17.6.0.023-orioledb
[STEP] Creating project with PostgresEngine 17-oriole...
INSERT 0 0
UPDATE 1
                version                |  region   |   provider_image_id   | release_channel | postgres_engine
---------------------------------------+-----------+-----------------------+-----------------+-----------------
 supabase-postgres-17.6.0.023-orioledb | us-east-1 | ami-0f43ec9b8b6fd211a | ga              | 17
(1 row)


Creating project on release channel "internal" with version "17.6.0.023-orioledb"
Project URL: http://localhost:8082/project/tvnyzciegexgikserbsi
Admin URL: http://localhost:4000/projects?identifier=tvnyzciegexgikserbsi
Database status is not yet available, waiting...
Database status is currently UNKNOWN, waiting...
Database status is currently COMING_UP, waiting...
Database status is currently COMING_UP, waiting...
Database status is currently COMING_UP, waiting...
Database status is currently COMING_UP, waiting...
Database status is now ACTIVE_HEALTHY
[SUCCESS] Project supadev-engine-smoke-1766512097-pg17_oriole created and reached ACTIVE_HEALTHY status
[INFO] Time to ACTIVE_HEALTHY: 314 seconds
[INFO] Sleeping for 10 seconds before checking project health
[STEP] Checking project health for supadev-engine-smoke-1766512097-pg17_oriole...
Waiting for all project components to become healthy, 5 retries remaining. Retrying in 2 seconds...
Waiting for all project components to become healthy, 4 retries remaining. Retrying in 4 seconds...
[
  {
    "name": "PostgREST",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "db_schema": "public,graphql_public"
    }
  },
  {
    "name": "Auth",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "description": "GoTrue is a user registration and authentication API",
      "name": "GoTrue",
      "version": "v2.184.0"
    }
  },
  {
    "name": "Storage",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Realtime",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "connected_cluster": 0,
      "db_connected": false,
      "healthy": true,
      "node": "realtime@2600:1f14:2de3:6d00:845:3edb:f6ce:3436",
      "region": "us-west-2"
    }
  },
  {
    "name": "Postgres (Admin)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Postgres (User)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Supavisor (TXN)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "PgBouncer",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  }
]
[STEP] Printing project information for supadev-engine-smoke-1766512097-pg17_oriole
{
  "cloud_provider": "AWS",
  "db_host": "db.tvnyzciegexgikserbsi.supabase.red",
  "id": 42,
  "inserted_at": "2025-12-23T18:04:20.460111",
  "name": "supadev-engine-smoke-1766512097-pg17_oriole",
  "organization_id": 1,
  "ref": "tvnyzciegexgikserbsi",
  "region": "us-east-1",
  "status": "ACTIVE_HEALTHY",
  "subscription_id": "Avx7DALGCeGDjvVm",
  "connectionString": "U2FsdGVkX1/C/5xmmEPahMeCSs15qJjnkBu4wh9pwu6BkgpLzVj3mgLK810+MffXag8d2lgYfyA5QSwRZtuy87bEkTuOOmXfawLRb8QDEYULHSt9j5XkG20h98PDMmR3xjiu+Qh25hCmMYWCx4C7hHuLXx+6NJFxHBgz+U1u6qS224SOXeeFR7fTEZsn3NoY",
  "restUrl": "https://tvnyzciegexgikserbsi.supabase.red/rest/v1/",
  "volumeSizeGb": 8,
  "maxDatabasePreprovisionGb": null,
  "lastDatabaseResizeAt": null,
  "is_branch_enabled": false,
  "is_physical_backups_enabled": false,
  "infra_compute_size": "nano",
  "dbVersion": "17.6.0.023-orioledb"
}

============================================================
Executing SQL tests (engine: 17-oriole)
============================================================
[STEP] Loading prime.sql to initialize extensions...
[SUCCESS] Extensions initialized
[STEP] Executing: auth (nix/tests/sql/auth.sql)
[SUCCESS] auth
[STEP] Executing: docs-array-test (nix/tests/sql/docs-array-test.sql)
[SUCCESS] docs-array-test
[STEP] Executing: docs-cascades-deletes (nix/tests/sql/docs-cascades-deletes.sql)
[SUCCESS] docs-cascades-deletes
[STEP] Executing: docs-connections (nix/tests/sql/docs-connections.sql)
[SUCCESS] docs-connections
[STEP] Executing: docs-enums (nix/tests/sql/docs-enums.sql)
[SUCCESS] docs-enums
[STEP] Executing: docs-full-text-search (nix/tests/sql/docs-full-text-search.sql)
[SUCCESS] docs-full-text-search
[STEP] Executing: docs-functions (nix/tests/sql/docs-functions.sql)
[SUCCESS] docs-functions
[STEP] Executing: docs-indexes (nix/tests/sql/docs-indexes.sql)
[SUCCESS] docs-indexes
[STEP] Executing: docs-json (nix/tests/sql/docs-json.sql)
[SUCCESS] docs-json
[STEP] Executing: docs-partitioning (nix/tests/sql/docs-partitioning.sql)
[SUCCESS] docs-partitioning
[STEP] Executing: docs-tables-and-data (nix/tests/sql/docs-tables-and-data.sql)
[SUCCESS] docs-tables-and-data
[STEP] Executing: docs-triggers (nix/tests/sql/docs-triggers.sql)
[SUCCESS] docs-triggers
[STEP] Executing: docs-webhooks (nix/tests/sql/docs-webhooks.sql)
[SUCCESS] docs-webhooks
[STEP] Executing: enable_tracking (nix/tests/sql/enable_tracking.sql)
[SUCCESS] enable_tracking
[STEP] Executing: evtrigs (nix/tests/sql/evtrigs.sql)
[SUCCESS] evtrigs
[STEP] Executing: extensions_schema (nix/tests/sql/extensions_schema.sql)
[SUCCESS] extensions_schema
[STEP] Executing: http (nix/tests/sql/http.sql)
[SUCCESS] http
[STEP] Executing: hypopg (nix/tests/sql/hypopg.sql)
[SUCCESS] hypopg
[STEP] Executing: index_advisor (nix/tests/sql/index_advisor.sql)
[SUCCESS] index_advisor
[STEP] Executing: pg-safeupdate (nix/tests/sql/pg-safeupdate.sql)
[SUCCESS] pg-safeupdate
[STEP] Executing: pg_graphql (nix/tests/sql/pg_graphql.sql)
[SUCCESS] pg_graphql
[STEP] Executing: pg_hashids (nix/tests/sql/pg_hashids.sql)
[SUCCESS] pg_hashids
[STEP] Executing: pg_jsonschema (nix/tests/sql/pg_jsonschema.sql)
[SUCCESS] pg_jsonschema
[STEP] Executing: pg_net (nix/tests/sql/pg_net.sql)
[SUCCESS] pg_net
[STEP] Executing: pg_partman (nix/tests/sql/pg_partman.sql)
[SUCCESS] pg_partman
[STEP] Executing: pg_plan_filter (nix/tests/sql/pg_plan_filter.sql)
[SUCCESS] pg_plan_filter
[STEP] Executing: pg_repack (nix/tests/sql/pg_repack.sql)
[SUCCESS] pg_repack
[STEP] Executing: pg_tle (nix/tests/sql/pg_tle.sql)
[SUCCESS] pg_tle
[STEP] Executing: pgaudit (nix/tests/sql/pgaudit.sql)
[SUCCESS] pgaudit
[STEP] Executing: pgbouncer (nix/tests/sql/pgbouncer.sql)
[SUCCESS] pgbouncer
[STEP] Executing: pgmq (nix/tests/sql/pgmq.sql)
[SUCCESS] pgmq
[STEP] Executing: pgroonga (nix/tests/sql/pgroonga.sql)
[SUCCESS] pgroonga
[STEP] Executing: pgrouting (nix/tests/sql/pgrouting.sql)
[SUCCESS] pgrouting
[STEP] Executing: pgsodium (nix/tests/sql/pgsodium.sql)
[SUCCESS] pgsodium
[STEP] Executing: pgtap (nix/tests/sql/pgtap.sql)
[SUCCESS] pgtap
[STEP] Executing: plpgsql-check (nix/tests/sql/plpgsql-check.sql)
[SUCCESS] plpgsql-check
[STEP] Executing: postgis (nix/tests/sql/postgis.sql)
[SUCCESS] postgis
[STEP] Executing: postgres_fdw (nix/tests/sql/postgres_fdw.sql)
[SUCCESS] postgres_fdw
[STEP] Executing: realtime (nix/tests/sql/realtime.sql)
[SUCCESS] realtime
[STEP] Executing: roles (nix/tests/sql/roles.sql)
[SUCCESS] roles
[STEP] Executing: security (nix/tests/sql/security.sql)
[SUCCESS] security
[STEP] Executing: storage (nix/tests/sql/storage.sql)
[SUCCESS] storage
[STEP] Executing: vault (nix/tests/sql/vault.sql)
[SUCCESS] vault
[STEP] Executing: wal2json (nix/tests/sql/wal2json.sql)
[SUCCESS] wal2json
[STEP] Executing: z_orioledb-17_ext_interface (nix/tests/sql/z_orioledb-17_ext_interface.sql)
[SUCCESS] z_orioledb-17_ext_interface
[STEP] Executing: z_orioledb-17_pg_stat_monitor (nix/tests/sql/z_orioledb-17_pg_stat_monitor.sql)
[SUCCESS] z_orioledb-17_pg_stat_monitor
[STEP] Executing: z_orioledb-17_pgvector (nix/tests/sql/z_orioledb-17_pgvector.sql)
[SUCCESS] z_orioledb-17_pgvector
[SUCCESS] All SQL tests executed
[STEP] Deleting project supadev-engine-smoke-1766512097-pg17_oriole...
Project deleted
[SUCCESS] Project supadev-engine-smoke-1766512097-pg17_oriole deleted successfully
[SUCCESS] PostgresEngine 17-oriole test completed successfully
[INFO] Total test duration: 506 seconds


============================================================
Cleaning Up: Withdrawing Inserted Versions
============================================================
[STEP] Withdrawing version 15.14.1.066 for engine 15...
[SUCCESS] Version 15.14.1.066 marked as withdrawn
[STEP] Withdrawing version 17.6.1.066 for engine 17...
[SUCCESS] Version 17.6.1.066 marked as withdrawn
[STEP] Withdrawing version 17.6.0.023-orioledb for engine 17-oriole...
[SUCCESS] Version 17.6.0.023-orioledb marked as withdrawn

============================================================
Test Summary
============================================================

ENGINE          RESULT
------          ------
15              PASSED (510s)
17              PASSED (438s)
17-oriole       PASSED (506s)

============================================================
Total: 3 | Passed: 3 | Failed: 0
============================================================
[INFO] Postgres commit: 3f8b9545a69b641b41a6d078e7963fdcb0d7fc16
[INFO] Cache location: /Users/lgug2z/.cache/supadev/postgres/3f8b9545a69b641b41a6d078e7963fdcb0d7fc16
[SUCCESS] All tests passed!

@LGUG2Z
Copy link

LGUG2Z commented Dec 23, 2025

Waiting on the upgrade smoke scenario results, will report back in about an hour when it's done for 15->17 and 17->17

@LGUG2Z
Copy link

LGUG2Z commented Dec 23, 2025

All good

❯ ./scripts/test-postgres-upgrade-with-smoke.sh https://github.com/supabase/postgres/pull/1990

============================================================
Supadev PostgreSQL Smoke Upgrade Test Suite
============================================================
[INFO] Testing PostgresEngines: 15 17
[INFO] Using region: us-east-1
[INFO] Project prefix: supadev-upgrade-smoke-1766526021
[INFO] SQL smoke directory: /Users/lgug2z/supadev/sql/smoke
[INFO] GitHub PR URL: https://github.com/supabase/postgres/pull/1990


============================================================
Testing PostgreSQL Smoke Upgrade: 15
============================================================
[INFO] Project name: supadev-upgrade-smoke-1766526021-pg15
[INFO] Region: us-east-1
[INFO] Start time: 2025-12-23 13:40:21
[STEP] Resolving version from PR for upgrade target engine 17...
[SUCCESS] Resolved version: 17.6.1.066
[STEP] Creating project with PostgresEngine 15 (ensuring version < 17.6.1.066)...
Creating project on release channel "ga" with version "supabase-postgres-15.14.1.063"
Project URL: http://localhost:8082/project/hqztlspcmoysbgxpzfzk
Admin URL: http://localhost:4000/projects?identifier=hqztlspcmoysbgxpzfzk
Database status is not yet available, waiting...
Database status is currently COMING_UP, waiting...
Database status is currently COMING_UP, waiting...
Database status is now ACTIVE_HEALTHY
[SUCCESS] Project supadev-upgrade-smoke-1766526021-pg15 created and reached ACTIVE_HEALTHY status
[INFO] Time to ACTIVE_HEALTHY: 131 seconds
[INFO] Sleeping for 10 seconds before checking project health
[STEP] Checking project health for supadev-upgrade-smoke-1766526021-pg15...
Waiting for all project components to become healthy, 5 retries remaining. Retrying in 2 seconds...
Waiting for all project components to become healthy, 4 retries remaining. Retrying in 4 seconds...
Waiting for all project components to become healthy, 3 retries remaining. Retrying in 8 seconds...
Waiting for all project components to become healthy, 2 retries remaining. Retrying in 16 seconds...
[
  {
    "name": "PostgREST",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "db_schema": "public,graphql_public"
    }
  },
  {
    "name": "Auth",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "description": "GoTrue is a user registration and authentication API",
      "name": "GoTrue",
      "version": "v2.184.0"
    }
  },
  {
    "name": "Storage",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Realtime",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "connected_cluster": 0,
      "db_connected": false,
      "healthy": true,
      "node": "realtime@2600:1f14:2de3:6d00:845:3edb:f6ce:3436",
      "region": "us-west-2"
    }
  },
  {
    "name": "Postgres (Admin)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Postgres (User)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Supavisor (TXN)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "PgBouncer",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  }
]
[STEP] Printing project information before upgrade...
{
  "cloud_provider": "AWS",
  "db_host": "db.hqztlspcmoysbgxpzfzk.supabase.red",
  "id": 4,
  "inserted_at": "2025-12-23T21:40:22.287497",
  "name": "supadev-upgrade-smoke-1766526021-pg15",
  "organization_id": 1,
  "ref": "hqztlspcmoysbgxpzfzk",
  "region": "us-east-1",
  "status": "ACTIVE_HEALTHY",
  "subscription_id": "Avx7DALGCeGDjvVm",
  "connectionString": "U2FsdGVkX1/iEZdEdopIM0meTaa9G+926dcsGp6q6gzIzy5eBb1mCn0nQaBWXi5+eQBK4bfeylhRt+m8/qOOz5yn9KAXXmnvcteDsLKMS2I2hA2DyKzs5+9brSXlkQ+l+moflZnfhBPSmwfhePu44A39mvSHOVnlH/6/Pk3HIsqiaa+eLDCNpzFEswqa2wf6",
  "restUrl": "https://hqztlspcmoysbgxpzfzk.supabase.red/rest/v1/",
  "volumeSizeGb": 8,
  "maxDatabasePreprovisionGb": null,
  "lastDatabaseResizeAt": null,
  "is_branch_enabled": false,
  "is_physical_backups_enabled": false,
  "infra_compute_size": "nano",
  "dbVersion": "supabase-postgres-15.14.1.063"
}

============================================================
Executing pre-upgrade SQL files
============================================================
[STEP] Executing SQL: 01-pgmq.sql
[INFO] SQL output:
CREATE EXTENSION
 create
--------

(1 row)

 send
------
    1
(1 row)
[SUCCESS] Found expected string (line 1): CREATE EXTENSION
[SUCCESS] Found expected string (line 2): create
[SUCCESS] Found expected string (line 3): send
[SUCCESS] Found expected string (line 4): 1
[SUCCESS] Verification passed for: 01-pgmq.sql

[STEP] Executing SQL: 02-items.sql
[INFO] SQL output:
CREATE TABLE
INSERT 0 2
  name
--------
 First
 Second
(2 rows)
[SUCCESS] Found expected string (line 1): CREATE TABLE
[SUCCESS] Found expected string (line 2): INSERT 0 2
[SUCCESS] Found expected string (line 3): name
[SUCCESS] Found expected string (line 4): First
[SUCCESS] Found expected string (line 5): Second
[SUCCESS] Verification passed for: 02-items.sql

[STEP] Executing SQL: 03-event_trigger.sql
[INFO] SQL output:
CREATE FUNCTION
CREATE EVENT TRIGGER
[SUCCESS] Found expected string (line 1): CREATE FUNCTION
[SUCCESS] Found expected string (line 2): CREATE EVENT TRIGGER
[SUCCESS] Verification passed for: 03-event_trigger.sql

[STEP] Executing SQL: 04-subitems.sql
[INFO] SQL output:
CREATE TABLE
                                   name
---------------------------------------------------------------------------
 First
 Second
 CREATE TABLE - public.subitems_1 - public - 2025-12-23 21:43:39.323257+00
(3 rows)
[SUCCESS] Found expected string (line 1): CREATE TABLE
[SUCCESS] Found expected string (line 2): name
[SUCCESS] Found expected string (line 3): First
[SUCCESS] Found expected string (line 4): Second
[SUCCESS] Found expected string (line 5): CREATE TABLE - public.subitems_1 - public
[SUCCESS] Verification passed for: 04-subitems.sql

[SUCCESS] All pre-upgrade SQL files executed and verified successfully
[STEP] Inserting version 17.6.1.066 as GA (with max id for upgrade eligibility)...
UPDATE 0
INSERT 0 0
UPDATE 1
UPDATE 1
  id  |           version            |  region   |   provider_image_id   | release_channel | postgres_engine
------+------------------------------+-----------+-----------------------+-----------------+-----------------
 9517 | supabase-postgres-17.6.1.066 | us-east-1 | ami-0dcc0d00c5464166b | ga              | 17
(1 row)


[SUCCESS] Version 17.6.1.066 inserted as GA
[STEP] Printing project upgrade eligibility...
{
  "eligible": true,
  "current_app_version": "supabase-postgres-15.14.1.063",
  "current_app_version_release_channel": "ga",
  "latest_app_version": "supabase-postgres-17.6.1.066",
  "target_upgrade_versions": [
    {
      "postgres_version": "17",
      "release_channel": "ga",
      "app_version": "supabase-postgres-17.6.1.066"
    },
    {
      "postgres_version": "17",
      "release_channel": "internal",
      "app_version": "supabase-postgres-17.4.1.077"
    }
  ],
  "duration_estimate_hours": 1,
  "legacy_auth_custom_roles": [],
  "objects_to_be_dropped": [],
  "unsupported_extensions": [],
  "user_defined_objects_in_internal_schemas": []
}
[STEP] Upgrading project to PostgresEngine 17 version 17.6.1.066...
UPDATE 0
INSERT 0 0
UPDATE 1
UPDATE 1
  id  |           version            |  region   |   provider_image_id   | release_channel | postgres_engine
------+------------------------------+-----------+-----------------------+-----------------+-----------------
 9518 | supabase-postgres-17.6.1.066 | us-east-1 | ami-0dcc0d00c5464166b | ga              | 17
(1 row)


Upgrade status is not yet available, waiting...
Upgrade status is currently 1_started, waiting...
Upgrade status is currently 1_started, waiting...
Upgrade status is currently 1_started, waiting...
Upgrade status is currently 5_initiated_data_upgrade, waiting...
Upgrade status is currently 5_initiated_data_upgrade, waiting...
Upgrade status is currently 5_initiated_data_upgrade, waiting...
Upgrade status is currently 5_initiated_data_upgrade, waiting...
Upgrade status is currently 6_completed_data_upgrade, waiting...
Upgrade status is now 9_completed_upgrade
[SUCCESS] Project supadev-upgrade-smoke-1766526021-pg15 upgraded successfully
[INFO] Time to complete upgrade: 565 seconds
[INFO] Sleeping for 60 seconds before checking project health
[STEP] Checking project health for supadev-upgrade-smoke-1766526021-pg15...
[
  {
    "name": "PostgREST",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "db_schema": "public,graphql_public"
    }
  },
  {
    "name": "Auth",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "description": "GoTrue is a user registration and authentication API",
      "name": "GoTrue",
      "version": "v2.184.0"
    }
  },
  {
    "name": "Storage",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Realtime",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "connected_cluster": 0,
      "db_connected": false,
      "healthy": true,
      "node": "realtime@2600:1f14:2de3:6d02:237:d20e:a670:a214",
      "region": "us-west-2"
    }
  },
  {
    "name": "Postgres (Admin)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Postgres (User)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Supavisor (TXN)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "PgBouncer",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  }
]
[STEP] Printing project information after upgrade...
{
  "cloud_provider": "AWS",
  "db_host": "db.hqztlspcmoysbgxpzfzk.supabase.red",
  "id": 4,
  "inserted_at": "2025-12-23T21:40:22.287497",
  "name": "supadev-upgrade-smoke-1766526021-pg15",
  "organization_id": 1,
  "ref": "hqztlspcmoysbgxpzfzk",
  "region": "us-east-1",
  "status": "ACTIVE_HEALTHY",
  "subscription_id": "Avx7DALGCeGDjvVm",
  "connectionString": "U2FsdGVkX18LP6l4KO9BF+AM7SwHV0ZjIR8/xwfzg9jPqhBvKLmCz2SyCeVci4GLc2xsPEOwgL+KtdEpIXsFityPFll5eO5dyDdz1nXvQuYZG7fuJ2xK1YG9UQ0U7E9nmASmCwMJmJh5lh+Ny1sis0kaSod0WQs8sywYYt8VQLq/JEFgnjlOj/Z+pr0/aoj4",
  "restUrl": "https://hqztlspcmoysbgxpzfzk.supabase.red/rest/v1/",
  "volumeSizeGb": 8,
  "maxDatabasePreprovisionGb": null,
  "lastDatabaseResizeAt": null,
  "is_branch_enabled": false,
  "is_physical_backups_enabled": false,
  "infra_compute_size": "nano",
  "dbVersion": "supabase-postgres-17.6.1.066"
}

============================================================
Executing post-upgrade SQL files
============================================================
[STEP] Executing SQL: 01-pgmq.sql
[INFO] SQL output:
 send
------
    2
(1 row)
[SUCCESS] Found expected string (line 1): send
[SUCCESS] Found expected string (line 2): 2
[SUCCESS] Verification passed for: 01-pgmq.sql

[STEP] Executing SQL: 02-items.sql
[INFO] SQL output:
                                   name
---------------------------------------------------------------------------
 First
 Second
 CREATE TABLE - public.subitems_1 - public - 2025-12-23 21:43:39.323257+00
(3 rows)
[SUCCESS] Found expected string (line 1): name
[SUCCESS] Found expected string (line 2): First
[SUCCESS] Found expected string (line 3): Second
[SUCCESS] Found expected string (line 4): CREATE TABLE - public.subitems_1 - public
[SUCCESS] Verification passed for: 02-items.sql

[STEP] Executing SQL: 03-subitems.sql
[INFO] SQL output:
CREATE TABLE
                                   name
---------------------------------------------------------------------------
 First
 Second
 CREATE TABLE - public.subitems_1 - public - 2025-12-23 21:43:39.323257+00
 CREATE TABLE - public.subitems_2 - public - 2025-12-23 21:53:02.618367+00
(4 rows)
[SUCCESS] Found expected string (line 1): CREATE TABLE
[SUCCESS] Found expected string (line 2): name
[SUCCESS] Found expected string (line 3): First
[SUCCESS] Found expected string (line 4): Second
[SUCCESS] Found expected string (line 5): CREATE TABLE - public.subitems_1 - public
[SUCCESS] Found expected string (line 6): CREATE TABLE - public.subitems_2 - public
[SUCCESS] Verification passed for: 03-subitems.sql

[SUCCESS] All post-upgrade SQL files executed and verified successfully
[STEP] Deleting project supadev-upgrade-smoke-1766526021-pg15...
Project deleted
[SUCCESS] Project supadev-upgrade-smoke-1766526021-pg15 deleted successfully
[STEP] Withdrawing version 17.6.1.066...
UPDATE 0
INSERT 0 0
UPDATE 1
UPDATE 1
  id  |           version            |  region   |   provider_image_id   | release_channel | postgres_engine
------+------------------------------+-----------+-----------------------+-----------------+-----------------
 9519 | supabase-postgres-17.6.1.066 | us-east-1 | ami-0dcc0d00c5464166b | withdrawn       | 17
(1 row)


[SUCCESS] Version 17.6.1.066 marked as withdrawn
[SUCCESS] PostgresEngine 15 smoke upgrade test completed successfully
[INFO] Total test duration: 763 seconds


============================================================
Testing PostgreSQL Smoke Upgrade: 17
============================================================
[INFO] Project name: supadev-upgrade-smoke-1766526021-pg17
[INFO] Region: us-east-1
[INFO] Start time: 2025-12-23 13:53:04
[STEP] Resolving version from PR for upgrade target engine 17...
[SUCCESS] Resolved version: 17.6.1.066
[STEP] Creating project with PostgresEngine 17 (ensuring version < 17.6.1.066)...
Creating project on release channel "ga" with version "supabase-postgres-17.6.1.063"
Project URL: http://localhost:8082/project/fxbcsuzezljhpldgmpie
Admin URL: http://localhost:4000/projects?identifier=fxbcsuzezljhpldgmpie
Database status is not yet available, waiting...
Database status is currently COMING_UP, waiting...
Database status is currently COMING_UP, waiting...
Database status is now ACTIVE_HEALTHY
[SUCCESS] Project supadev-upgrade-smoke-1766526021-pg17 created and reached ACTIVE_HEALTHY status
[INFO] Time to ACTIVE_HEALTHY: 131 seconds
[INFO] Sleeping for 10 seconds before checking project health
[STEP] Checking project health for supadev-upgrade-smoke-1766526021-pg17...
Waiting for all project components to become healthy, 5 retries remaining. Retrying in 2 seconds...
Waiting for all project components to become healthy, 4 retries remaining. Retrying in 4 seconds...
[
  {
    "name": "PostgREST",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "db_schema": "public,graphql_public"
    }
  },
  {
    "name": "Auth",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "description": "GoTrue is a user registration and authentication API",
      "name": "GoTrue",
      "version": "v2.184.0"
    }
  },
  {
    "name": "Storage",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Realtime",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "connected_cluster": 0,
      "db_connected": false,
      "healthy": true,
      "node": "realtime@2600:1f14:2de3:6d00:845:3edb:f6ce:3436",
      "region": "us-west-2"
    }
  },
  {
    "name": "Postgres (Admin)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Postgres (User)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Supavisor (TXN)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "PgBouncer",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  }
]
[STEP] Printing project information before upgrade...
{
  "cloud_provider": "AWS",
  "db_host": "db.fxbcsuzezljhpldgmpie.supabase.red",
  "id": 5,
  "inserted_at": "2025-12-23T21:53:05.373611",
  "name": "supadev-upgrade-smoke-1766526021-pg17",
  "organization_id": 1,
  "ref": "fxbcsuzezljhpldgmpie",
  "region": "us-east-1",
  "status": "ACTIVE_HEALTHY",
  "subscription_id": "Avx7DALGCeGDjvVm",
  "connectionString": "U2FsdGVkX1/yCuR3pL3IP22v5LGCl/B3ZaDJf96I1A7fFO2cUnjH34ytgrW84/5rcUUH2Cgf2SDMbm5JrVvbY3AOGQQyI4/sjJs9q8kBdIcIIJYnK3WMvwzbP+vU5FCBajwIN6+O7GC10URGZZBnwkqR4v6bgCQSKD4MjiQy/eRJ08SKN6YR9oU0Vjk9k5hi",
  "restUrl": "https://fxbcsuzezljhpldgmpie.supabase.red/rest/v1/",
  "volumeSizeGb": 8,
  "maxDatabasePreprovisionGb": null,
  "lastDatabaseResizeAt": null,
  "is_branch_enabled": false,
  "is_physical_backups_enabled": false,
  "infra_compute_size": "nano",
  "dbVersion": "supabase-postgres-17.6.1.063"
}

============================================================
Executing pre-upgrade SQL files
============================================================
[STEP] Executing SQL: 01-pgmq.sql
[INFO] SQL output:
CREATE EXTENSION
 create
--------

(1 row)

 send
------
    1
(1 row)
[SUCCESS] Found expected string (line 1): CREATE EXTENSION
[SUCCESS] Found expected string (line 2): create
[SUCCESS] Found expected string (line 3): send
[SUCCESS] Found expected string (line 4): 1
[SUCCESS] Verification passed for: 01-pgmq.sql

[STEP] Executing SQL: 02-items.sql
[INFO] SQL output:
CREATE TABLE
INSERT 0 2
  name
--------
 First
 Second
(2 rows)
[SUCCESS] Found expected string (line 1): CREATE TABLE
[SUCCESS] Found expected string (line 2): INSERT 0 2
[SUCCESS] Found expected string (line 3): name
[SUCCESS] Found expected string (line 4): First
[SUCCESS] Found expected string (line 5): Second
[SUCCESS] Verification passed for: 02-items.sql

[STEP] Executing SQL: 03-event_trigger.sql
[INFO] SQL output:
CREATE FUNCTION
CREATE EVENT TRIGGER
[SUCCESS] Found expected string (line 1): CREATE FUNCTION
[SUCCESS] Found expected string (line 2): CREATE EVENT TRIGGER
[SUCCESS] Verification passed for: 03-event_trigger.sql

[STEP] Executing SQL: 04-subitems.sql
[INFO] SQL output:
CREATE TABLE
                                   name
---------------------------------------------------------------------------
 First
 Second
 CREATE TABLE - public.subitems_1 - public - 2025-12-23 21:55:50.260171+00
(3 rows)
[SUCCESS] Found expected string (line 1): CREATE TABLE
[SUCCESS] Found expected string (line 2): name
[SUCCESS] Found expected string (line 3): First
[SUCCESS] Found expected string (line 4): Second
[SUCCESS] Found expected string (line 5): CREATE TABLE - public.subitems_1 - public
[SUCCESS] Verification passed for: 04-subitems.sql

[SUCCESS] All pre-upgrade SQL files executed and verified successfully
[STEP] Inserting version 17.6.1.066 as GA (with max id for upgrade eligibility)...
UPDATE 0
INSERT 0 0
UPDATE 1
UPDATE 1
  id  |           version            |  region   |   provider_image_id   | release_channel | postgres_engine
------+------------------------------+-----------+-----------------------+-----------------+-----------------
 9520 | supabase-postgres-17.6.1.066 | us-east-1 | ami-0dcc0d00c5464166b | ga              | 17
(1 row)


[SUCCESS] Version 17.6.1.066 inserted as GA
[STEP] Printing project upgrade eligibility...
{
  "eligible": true,
  "current_app_version": "supabase-postgres-17.6.1.063",
  "current_app_version_release_channel": "ga",
  "latest_app_version": "supabase-postgres-17.6.1.066",
  "target_upgrade_versions": [
    {
      "postgres_version": "17",
      "release_channel": "ga",
      "app_version": "supabase-postgres-17.6.1.066"
    }
  ],
  "duration_estimate_hours": 1,
  "legacy_auth_custom_roles": [],
  "objects_to_be_dropped": [],
  "unsupported_extensions": [],
  "user_defined_objects_in_internal_schemas": []
}
[STEP] Upgrading project to PostgresEngine 17 version 17.6.1.066...
UPDATE 0
INSERT 0 0
UPDATE 1
UPDATE 1
  id  |           version            |  region   |   provider_image_id   | release_channel | postgres_engine
------+------------------------------+-----------+-----------------------+-----------------+-----------------
 9521 | supabase-postgres-17.6.1.066 | us-east-1 | ami-0dcc0d00c5464166b | ga              | 17
(1 row)


Upgrade status is not yet available, waiting...
Upgrade status is currently 1_started, waiting...
Upgrade status is currently 1_started, waiting...
Upgrade status is currently 1_started, waiting...
Upgrade status is currently 5_initiated_data_upgrade, waiting...
Upgrade status is currently 5_initiated_data_upgrade, waiting...
Upgrade status is currently 5_initiated_data_upgrade, waiting...
Upgrade status is currently 6_completed_data_upgrade, waiting...
Upgrade status is now 9_completed_upgrade
[SUCCESS] Project supadev-upgrade-smoke-1766526021-pg17 upgraded successfully
[INFO] Time to complete upgrade: 475 seconds
[INFO] Sleeping for 60 seconds before checking project health
[STEP] Checking project health for supadev-upgrade-smoke-1766526021-pg17...
[
  {
    "name": "PostgREST",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "db_schema": "public,graphql_public"
    }
  },
  {
    "name": "Auth",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "description": "GoTrue is a user registration and authentication API",
      "name": "GoTrue",
      "version": "v2.184.0"
    }
  },
  {
    "name": "Storage",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Realtime",
    "healthy": true,
    "status": "ACTIVE_HEALTHY",
    "info": {
      "connected_cluster": 0,
      "db_connected": false,
      "healthy": true,
      "node": "realtime@2600:1f14:2de3:6d02:237:d20e:a670:a214",
      "region": "us-west-2"
    }
  },
  {
    "name": "Postgres (Admin)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Postgres (User)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "Supavisor (TXN)",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  },
  {
    "name": "PgBouncer",
    "healthy": true,
    "status": "ACTIVE_HEALTHY"
  }
]
[STEP] Printing project information after upgrade...
{
  "cloud_provider": "AWS",
  "db_host": "db.fxbcsuzezljhpldgmpie.supabase.red",
  "id": 5,
  "inserted_at": "2025-12-23T21:53:05.373611",
  "name": "supadev-upgrade-smoke-1766526021-pg17",
  "organization_id": 1,
  "ref": "fxbcsuzezljhpldgmpie",
  "region": "us-east-1",
  "status": "ACTIVE_HEALTHY",
  "subscription_id": "Avx7DALGCeGDjvVm",
  "connectionString": "U2FsdGVkX1+jZOFvsXc3huubaDyFJ4t21b3+TfXg3GcV4bLfaaEo9HG0In1wj2/ffZAolAHhV2ceIvTiKg2Udkzz1fauLo3YrmRdHEKSCgxR/QtSWIft5h5D/DfsqSpZHC7KMBKhT/ICwQShzEdd37smg/EFg8j42sy2LjeQTNzU0sdingQ4ba/YNoln/0qk",
  "restUrl": "https://fxbcsuzezljhpldgmpie.supabase.red/rest/v1/",
  "volumeSizeGb": 8,
  "maxDatabasePreprovisionGb": null,
  "lastDatabaseResizeAt": null,
  "is_branch_enabled": false,
  "is_physical_backups_enabled": false,
  "infra_compute_size": "nano",
  "dbVersion": "supabase-postgres-17.6.1.063"
}

============================================================
Executing post-upgrade SQL files
============================================================
[STEP] Executing SQL: 01-pgmq.sql
[INFO] SQL output:
 send
------
    2
(1 row)
[SUCCESS] Found expected string (line 1): send
[SUCCESS] Found expected string (line 2): 2
[SUCCESS] Verification passed for: 01-pgmq.sql

[STEP] Executing SQL: 02-items.sql
[INFO] SQL output:
                                   name
---------------------------------------------------------------------------
 First
 Second
 CREATE TABLE - public.subitems_1 - public - 2025-12-23 21:55:50.260171+00
(3 rows)
[SUCCESS] Found expected string (line 1): name
[SUCCESS] Found expected string (line 2): First
[SUCCESS] Found expected string (line 3): Second
[SUCCESS] Found expected string (line 4): CREATE TABLE - public.subitems_1 - public
[SUCCESS] Verification passed for: 02-items.sql

[STEP] Executing SQL: 03-subitems.sql
[INFO] SQL output:
CREATE TABLE
                                   name
---------------------------------------------------------------------------
 First
 Second
 CREATE TABLE - public.subitems_1 - public - 2025-12-23 21:55:50.260171+00
 CREATE TABLE - public.subitems_2 - public - 2025-12-23 22:04:17.525426+00
(4 rows)
[SUCCESS] Found expected string (line 1): CREATE TABLE
[SUCCESS] Found expected string (line 2): name
[SUCCESS] Found expected string (line 3): First
[SUCCESS] Found expected string (line 4): Second
[SUCCESS] Found expected string (line 5): CREATE TABLE - public.subitems_1 - public
[SUCCESS] Found expected string (line 6): CREATE TABLE - public.subitems_2 - public
[SUCCESS] Verification passed for: 03-subitems.sql

[SUCCESS] All post-upgrade SQL files executed and verified successfully
[STEP] Deleting project supadev-upgrade-smoke-1766526021-pg17...
Project deleted
[SUCCESS] Project supadev-upgrade-smoke-1766526021-pg17 deleted successfully
[STEP] Withdrawing version 17.6.1.066...
UPDATE 0
INSERT 0 0
UPDATE 1
UPDATE 1
  id  |           version            |  region   |   provider_image_id   | release_channel | postgres_engine
------+------------------------------+-----------+-----------------------+-----------------+-----------------
 9522 | supabase-postgres-17.6.1.066 | us-east-1 | ami-0dcc0d00c5464166b | withdrawn       | 17
(1 row)


[SUCCESS] Version 17.6.1.066 marked as withdrawn
[SUCCESS] PostgresEngine 17 smoke upgrade test completed successfully
[INFO] Total test duration: 675 seconds


============================================================
Test Summary
============================================================

ENGINE          RESULT
------          ------
15              PASSED (763s)
17              PASSED (675s)

============================================================
Total: 2 | Passed: 2 | Failed: 0
============================================================
[SUCCESS] All tests passed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants