Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(setup-postgres.yml): fix missing initdb calls#1924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jchancojr wants to merge9 commits intodevelop
base:develop
Choose a base branch
Loading
fromINDATA-211

Conversation

@jchancojr
Copy link
Contributor

@jchancojrjchancojr commentedNov 17, 2025
edited by coderabbitaibot
Loading

What kind of change does this PR introduce?

updates initdb calls with checksum flag

What is the current behavior?

missing calls from ansible playbook with checksum flag

What is the new behavior?

updated initdb flags for checksums

Additional context

none

Summary by CodeRabbit

  • Chores
    • Improved PostgreSQL data integrity by enabling checksums during database initialization across all deployment configurations.

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

@jchancojrjchancojr marked this pull request as ready for reviewNovember 18, 2025 18:25
@jchancojrjchancojr requested review froma team ascode ownersNovember 18, 2025 18:25
@jchancojrjchancojr marked this pull request as draftNovember 18, 2025 18:40
@jchancojr
Copy link
ContributorAuthor

✅ Tested pause/restore on local infra withsupabase-postgres-15.14.1.052-INDATA-211 AMI.

⏱️ Pending upgrade test

@jchancojrjchancojr marked this pull request as ready for reviewDecember 10, 2025 15:06
Copy link

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds the--data-checksums flag to PostgreSQL initdb commands in the Ansible playbook to enable data page checksums for data corruption detection.

Key Changes:

  • Added--data-checksums flag to both initdb command variations (standard and ICU locale-enabled)

💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

Copy link
Contributor

@hunleydhunleyd left a comment

Choose a reason for hiding this comment

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

i think you also need to adjust some additional files likeansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh,nix/init.sh,nix/docker/init.sh.in,nix/checks.nix. There are potentially others found by usingrg initdb at the top of the repo.@samrose can probably confirm if the others need altered once you have a complete list

Copy link

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

Copy link
Collaborator

@samrosesamrose left a comment

Choose a reason for hiding this comment

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

@jchancojr the change itself looks good. it's not clear here that we have determined if adding checksums will break the various processes that manage the db (upgrade from db with no checksum, pause/restore, read replica). what was the outcome of testing this?

Will these changes need to be backported to existing projects or is it for new projects only? Glad to follow up and re-review asap but definitely we're requiring documentation of passing tests somehow, and in linear issue could point to our plan for backporting if that is needed?

@LGUG2Z
Copy link

Postgres AMI smoke tests passed:

❯ ./scripts/test-postgres-smoke.sh https://github.com/supabase/postgres/pull/1924============================================================Supadev PostgreSQL Smoke Upgrade Test Suite============================================================[INFO] Testing PostgresEngines: 15 17[INFO] Using region: us-east-1[INFO] Project prefix: supadev-smoke-1766075563[INFO] SQL smoke directory: /Users/lgug2z/supadev/sql/smoke[INFO] GitHub PR URL: https://github.com/supabase/postgres/pull/1924============================================================Testing PostgreSQL Smoke Upgrade: 15============================================================[INFO] Project name: supadev-smoke-1766075563-pg15[INFO] Region: us-east-1[INFO] Start time: 2025-12-18 08:32:43[STEP] Resolving version from PR for upgrade target engine 17...[SUCCESS] Resolved version: 17.6.1.064[STEP] Ensuring version 17.6.1.064 is withdrawn...                                                                                                                                                        INSERT 0 1UPDATE 1           version            |  region   |   provider_image_id   | release_channel | postgres_engine------------------------------+-----------+-----------------------+-----------------+----------------- supabase-postgres-17.6.1.064 | us-east-1 | ami-0635895a78d6e6948 | withdrawn       | 17(1 row)[STEP] Creating project with PostgresEngine 15...Project URL: http://localhost:8082/project/jeeqrfqlnfwissdvkkaqAdmin URL: http://localhost:4000/projects?identifier=jeeqrfqlnfwissdvkkaqDatabase 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 now ACTIVE_HEALTHY[SUCCESS] Project supadev-smoke-1766075563-pg15 created and reached ACTIVE_HEALTHY status[INFO] Time to ACTIVE_HEALTHY: 256 seconds[INFO] Sleeping for 10 seconds before checking project health[STEP] Checking project health for supadev-smoke-1766075563-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:6d00:81b2:15e0:3496:8794",      "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.jeeqrfqlnfwissdvkkaq.supabase.red",  "id": 14,  "inserted_at": "2025-12-18T16:32:48.634295",  "name": "supadev-smoke-1766075563-pg15",  "organization_id": 1,  "ref": "jeeqrfqlnfwissdvkkaq",  "region": "us-east-1",  "status": "ACTIVE_HEALTHY",  "subscription_id": "Avx7DALGCeGDjvVm",  "connectionString": "U2FsdGVkX1+TV1YZuFyUPsOP4mkzQhaeWX3IJ2VqB0m7t4GltZJhu3/yKoPO/IUKKTPd6VW1bvks/WP0a9c8M6NRBZDxAtVOsc1uqxNA+OuC96md54t4d6oBr11ULtZ8nALsRJUVZD6KNeifN4kfoI2ZPVZvxuHccN6gMt0zMwd2DrzbG8clmN801wX0Tpe+",  "restUrl": "https://jeeqrfqlnfwissdvkkaq.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 TABLEINSERT 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 FUNCTIONCREATE 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-18 16:37:18.072593+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.064 as GA...INSERT 0 0UPDATE 1           version            |  region   |   provider_image_id   | release_channel | postgres_engine------------------------------+-----------+-----------------------+-----------------+----------------- supabase-postgres-17.6.1.064 | us-east-1 | ami-0635895a78d6e6948 | ga              | 17(1 row)[SUCCESS] Version 17.6.1.064 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.064",  "target_upgrade_versions": [    {      "postgres_version": "17",      "release_channel": "ga",      "app_version": "supabase-postgres-17.6.1.064"    },    {      "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.064...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 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 8_attached_volume_to_upgraded_instance, waiting...Upgrade status is now 9_completed_upgrade[SUCCESS] Project supadev-smoke-1766075563-pg15 upgraded successfully[INFO] Time to complete upgrade: 580 seconds[INFO] Sleeping for 60 seconds before checking project health[STEP] Checking project health for supadev-smoke-1766075563-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:6d00:81b2:15e0:3496:8794",      "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.jeeqrfqlnfwissdvkkaq.supabase.red",  "id": 14,  "inserted_at": "2025-12-18T16:32:48.634295",  "name": "supadev-smoke-1766075563-pg15",  "organization_id": 1,  "ref": "jeeqrfqlnfwissdvkkaq",  "region": "us-east-1",  "status": "ACTIVE_HEALTHY",  "subscription_id": "Avx7DALGCeGDjvVm",  "connectionString": "U2FsdGVkX19IQH1ypxbqGP0mUZGXTucqAXxqAhuvlWFetXwiC1tUHUBjNgP/mx4MRj/8LWCt+FZZQGs/iBkGUXQ1cvrb88avkAx/+NiYvQ35SCYDaBU27L/Rq+dSwZn7Mr2GlubHQ0/WhuACSkM1I8xWXt6HmOn9RnHJHBj8IaPHih9iBEuyr7lLD1N1T/JF",  "restUrl": "https://jeeqrfqlnfwissdvkkaq.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.064"}============================================================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-18 16:37:18.072593+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-18 16:37:18.072593+00 CREATE TABLE - public.subitems_2 - public - 2025-12-18 16:47:45.676037+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-smoke-1766075563-pg15...Project deleted[SUCCESS] Project supadev-smoke-1766075563-pg15 deleted successfully[STEP] Withdrawing version 17.6.1.064...INSERT 0 0UPDATE 1           version            |  region   |   provider_image_id   | release_channel | postgres_engine------------------------------+-----------+-----------------------+-----------------+----------------- supabase-postgres-17.6.1.064 | us-east-1 | ami-0635895a78d6e6948 | withdrawn       | 17(1 row)[SUCCESS] Version 17.6.1.064 marked as withdrawn[SUCCESS] PostgresEngine 15 smoke upgrade test completed successfully[INFO] Total test duration: 905 seconds============================================================Testing PostgreSQL Smoke Upgrade: 17============================================================[INFO] Project name: supadev-smoke-1766075563-pg17[INFO] Region: us-east-1[INFO] Start time: 2025-12-18 08:47:48[STEP] Resolving version from PR for upgrade target engine 17...[SUCCESS] Resolved version: 17.6.1.064[STEP] Ensuring version 17.6.1.064 is withdrawn...INSERT 0 0UPDATE 1           version            |  region   |   provider_image_id   | release_channel | postgres_engine------------------------------+-----------+-----------------------+-----------------+----------------- supabase-postgres-17.6.1.064 | us-east-1 | ami-0635895a78d6e6948 | withdrawn       | 17(1 row)[STEP] Creating project with PostgresEngine 17...Project URL: http://localhost:8082/project/yxewmrktudqnfvykresaAdmin URL: http://localhost:4000/projects?identifier=yxewmrktudqnfvykresaDatabase 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-smoke-1766075563-pg17 created and reached ACTIVE_HEALTHY status[INFO] Time to ACTIVE_HEALTHY: 133 seconds[INFO] Sleeping for 10 seconds before checking project health[STEP] Checking project health for supadev-smoke-1766075563-pg17...Waiting for all project components to become healthy, 4 retry attempt(s) remaining...[  {    "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:81b2:15e0:3496:8794",      "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.yxewmrktudqnfvykresa.supabase.red",  "id": 15,  "inserted_at": "2025-12-18T16:47:51.521957",  "name": "supadev-smoke-1766075563-pg17",  "organization_id": 1,  "ref": "yxewmrktudqnfvykresa",  "region": "us-east-1",  "status": "ACTIVE_HEALTHY",  "subscription_id": "Avx7DALGCeGDjvVm",  "connectionString": "U2FsdGVkX1+jW1DTOjx79nR2EtyZy/ECNUrmOTT/owTCRGjZDqVLeuY3Pq8w6WiqnJIpLsVuBAOXdqk5NfhOiV4IaP7aRYqFg15gbh+t41FvSRVLOr03I3/cHsT7QnyE1BYXcDZG+Nwp5u0tH9pMdjCjjGLZr+VXMC1iYBujpV63W5mm84NcOHJ9KEvsUT04",  "restUrl": "https://yxewmrktudqnfvykresa.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 TABLEINSERT 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 FUNCTIONCREATE 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-18 16:50:40.484305+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.064 as GA...INSERT 0 0UPDATE 1           version            |  region   |   provider_image_id   | release_channel | postgres_engine------------------------------+-----------+-----------------------+-----------------+----------------- supabase-postgres-17.6.1.064 | us-east-1 | ami-0635895a78d6e6948 | ga              | 17(1 row)[SUCCESS] Version 17.6.1.064 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.064",  "target_upgrade_versions": [    {      "postgres_version": "17",      "release_channel": "ga",      "app_version": "supabase-postgres-17.6.1.064"    }  ],  "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.064...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 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 7_detached_volume_from_original_instance, waiting...Upgrade status is now 9_completed_upgrade[SUCCESS] Project supadev-smoke-1766075563-pg17 upgraded successfully[INFO] Time to complete upgrade: 541 seconds[INFO] Sleeping for 60 seconds before checking project health[STEP] Checking project health for supadev-smoke-1766075563-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:6d00:81b2:15e0:3496:8794",      "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.yxewmrktudqnfvykresa.supabase.red",  "id": 15,  "inserted_at": "2025-12-18T16:47:51.521957",  "name": "supadev-smoke-1766075563-pg17",  "organization_id": 1,  "ref": "yxewmrktudqnfvykresa",  "region": "us-east-1",  "status": "ACTIVE_HEALTHY",  "subscription_id": "Avx7DALGCeGDjvVm",  "connectionString": "U2FsdGVkX1/Lgo5Mb69Pe3roZzacZzYYBcw73JFcht6R+IOJxpOToDqbJJB9MHEvqZDfNzE2PrqcDbUfgxJJoOqlxt8Zf6m5lcNNwV7Hgss8kI2DHXvk3AIKg/+EMbx3OJtxpRgFtEM5gPcOewv8G7RajhhNhcWOTaGHnQAIhNXegcIzfdlmR79/gw3omhpg",  "restUrl": "https://yxewmrktudqnfvykresa.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.064"}============================================================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-18 16:50:40.484305+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-18 16:50:40.484305+00 CREATE TABLE - public.subitems_2 - public - 2025-12-18 17:00:08.086992+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-smoke-1766075563-pg17...Project deleted[SUCCESS] Project supadev-smoke-1766075563-pg17 deleted successfully[STEP] Withdrawing version 17.6.1.064...INSERT 0 0UPDATE 1           version            |  region   |   provider_image_id   | release_channel | postgres_engine------------------------------+-----------+-----------------------+-----------------+----------------- supabase-postgres-17.6.1.064 | us-east-1 | ami-0635895a78d6e6948 | withdrawn       | 17(1 row)[SUCCESS] Version 17.6.1.064 marked as withdrawn[SUCCESS] PostgresEngine 17 smoke upgrade test completed successfully[INFO] Total test duration: 742 seconds============================================================Test Summary============================================================ENGINE          RESULT------          ------15              PASSED (905s)17              PASSED (742s)============================================================Total: 2 | Passed: 2 | Failed: 0============================================================[SUCCESS] All tests passed!

@coderabbitai
Copy link

coderabbitaibot commentedDec 19, 2025
edited
Loading

Walkthrough

Added thedata-checksums flag to PostgreSQLpg_ctl initdb invocations across multiple initialization paths in the Ansible setup playbook. The flag is applied to the general initialization step and stage2_nix initialization for both non-orioleledb and orioleledb branches.

Changes

Cohort / File(s)Summary
PostgreSQL initdb flag updates
ansible/tasks/setup-postgres.yml
Added--data-checksums flag to threepg_ctl initdb invocations: general Init DB step, stage2_nix non-orioleledb path, and stage2_nix orioleledb path. All other arguments and behavior unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single file with repetitive, homogeneous changes (adding identical flag across three locations)
  • Pure configuration modification with no logic changes
  • No control flow or error handling modifications

Poem

🐰A checksummed hop through data fields fair,
Three paths now guarded with cryptographic care,
The flag is planted, small but strong,
Where PostgreSQL's mighty roots belong,
Data integrity hops all day long!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check nameStatusExplanationResolution
Title check⚠️ WarningThe title mentions 'fix missing initdb calls' but the actual change is adding a data-checksums flag to existing initdb invocations, not fixing missing calls.Update the title to accurately reflect the change, e.g., 'fix(setup-postgres.yml): add data-checksums flag to initdb invocations'.
Description check❓ InconclusiveThe description covers the basic change (adding checksums flag) but lacks detail about affected locations and doesn't follow the provided template structure.Follow the repository's PR template structure more closely and provide specific details about which tasks/playbook sections were modified.
✅ Passed checks (1 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo 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 branchINDATA-211

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

Copy link

@coderabbitaicoderabbitaibot 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)
ansible/tasks/setup-postgres.yml (1)

217-217:LGTM! Data checksums enabled correctly.

The--data-checksums flag is properly added to enable PostgreSQL data page checksums, which help detect storage corruption. The syntax and placement are correct.

Optional: Consider moving flag to end for consistency

For consistency with lines 245 and 262 where--data-checksums appears at the end, consider:

-        cmd: /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data initdb -o "--allow-group-access" -o "--data-checksums" -o "--username=supabase_admin"+        cmd: /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data initdb -o "--allow-group-access" -o "--username=supabase_admin" -o "--data-checksums"

This is purely stylistic as the order of initdb options doesn't affect functionality.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and betweend98ae95 and607a90a.

📒 Files selected for processing (1)
  • ansible/tasks/setup-postgres.yml (2 hunks)
⏰ 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: nix-eval / eval
🔇 Additional comments (3)
ansible/tasks/setup-postgres.yml (3)

245-245:LGTM! Checksums enabled for non-OrioleDB initialization.

The--data-checksums flag is correctly added to the stage2_nix non-orioledb initialization path. The flag placement at the end is consistent with the orioledb variant at line 262.


262-262:LGTM! Checksums enabled for OrioleDB/Postgres 17 initialization.

The--data-checksums flag is correctly added to the stage2_nix orioledb initialization path. The flag placement is consistent with the non-orioledb variant, and all options are properly formatted.


217-217:Adding checksums to new database initialization is the correct approach for this PR.

The--data-checksums flag properly enables checksums at cluster initialization, which is the standard way to ensure all new instances have this protection. This aligns with PostgreSQL best practices: there is wide consensus that checksums are an extraordinarily safe, desirable setting, and most major commercial and open source PostgreSQL systems enable this by default.

The smoke test results for fresh installations and upgrade scenarios confirm the change works correctly in this context.

Also applies to: 245-245, 262-262

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

Reviewers

@coderabbitaicoderabbitai[bot]coderabbitai[bot] left review comments

Copilot code reviewCopilotCopilot left review comments

@samrosesamrosesamrose approved these changes

@hunleydhunleydhunleyd approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@jchancojr@LGUG2Z@samrose@hunleyd

[8]ページ先頭

©2009-2025 Movatter.jp