feat: enable customer installation of amcheck (PSQL-1327)#2240
feat: enable customer installation of amcheck (PSQL-1327)#2240brainrake wants to merge 1 commit into
Conversation
amcheck was in supautils' "may be unsafe" list based on upstream PostgreSQL's general caution around physical data structure exposure in error messages. No Supabase-specific exploit was ever documented. The restriction created a support gap: customers hit corrupted indexes after 15→17 upgrades and could not use bt_index_check() to enumerate and fix individual indexes, forcing full REINDEX DATABASE instead. Move amcheck from the superuser-only list to privileged_extensions so customers can install it. Update nix/tests/prime.sql and prime-superuser.sql to match. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PostgreSQL Extension Dependency Analysis: PR #2240
SummaryNo extensions had dependencies with MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Extension DependenciesPostgreSQL 17 Extension DependenciesOrioleDB 17 Extension Dependencies |
PostgreSQL Package Dependency Analysis: PR #2240
SummaryNo packages had MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Dependency ChangesExtracting PostgreSQL 15 dependencies...
Runtime Closure Size
Raw Dependency ClosurePostgreSQL 17 Dependency ChangesExtracting PostgreSQL 17 dependencies...
Runtime Closure Size
Raw Dependency Closure |
|
#2240 (comment) |
|
Backup Testing section in current PR description has an item that does not sound reasonable to me.
Assuming old and new correspond to Postgres 15 and 17, this is not an easy task. I do not yet know what options do our users have for restoring but the most probable methods do not work. Postgres 15 was shipped with amcheck Official support for downgrading to an older major version is explicitly not supported by PostgreSQL via standard restore tools. One can always try to manually fix issues in the dump and attempt to restore. It is highly likely that many iterations of edits and retries are required until you can actually downgrade your database version. |
Closes PSQL-1327
What kind of change does this PR introduce?
Move the amcheck contrib extension from the superuser-only list to privileged_extensions so customers can install it. Update nix/tests/prime.sql and prime-superuser.sql to match.
Additional context
amcheck was in supautils' "may be unsafe" list based on upstream PostgreSQL's caution around physical data structure exposure in error messages. No Supabase-specific exploit wa documented.
The restriction created a support gap: customers hit corrupted indexes after 15→17 upgrades and could not use bt_index_check() to enumerate and fix individual indexes, forcing full REINDEX DATABASE instead.
Add any other context or screenshots.
Action Items
Extensions compatibility testing
pg_net- execute HTTP requestspg_graphql- execute queries and mutationsBackup Testing
Follow the testing steps steps for all the following cases:
Testing steps
supa db-stats gather -p <project_ref>supa db-stats verifyagainst the project and the previously saved file