[BUG] Undocumented dependency on Postgres Extension `btree_gist`
Describe the issue
A goose migration uses the extension `btree_gist.
The extension is built-in so it's often available, but in some cloud environments it needs to be explicitly enabled.
For example Azure Database for PostgresSQL needs it explicitly enabled.
Migrations will then fail if the extension is not enabled
Environment
- SDK: NA
- Engine: Not sure about what version, but any versions released since 2026-05-22, inferring from the migrations timestamp
Expected behavior I'd expect it to be documented in the selfhosting docs somewhere.
Unfortunately I don't think there's a nice explicit way to set it as a dependency.
Code to Reproduce, Logs, or Screenshots We got
ERROR: extension "btree_gist" is not allow-listed for users in Azure Database for PostgreSQL (SQLSTATE 0A000)Additional context
We had several problems while upgrading, but it's not yet clear to us what else happened. We're trying to reproduce it, but basically we changed the type/family of the database server in azure and then got
stderr F 2026/09/17 11:24:57 engine failure: could not run with config: could not start tasks controller: could not create table partition: ERROR: relation "v1_event" does not exist (SQLSTATE 42P01)then somehow
engine failure: could not run with config: could not start olap controller: could not create table partition: could not create table partition: ERROR: partition "v1_dags_olap_20260714" already pending detach in partitioned table "public.v1_dags_olap" (SQLSTATE 55000)Then when trying to start from a fresh environment we got the extension error
hatchet-migrate[DATABASE_URL oss]: failed during apply migrations on postgres://<redacted>@psql-bls-caei-demo-oa6.postgres.database.azure.com:5432/hatchet_db?keys=tls: ERROR 20260522014401_v1_0_113.sql: failed to run SQL migration: failed to execute SQL query "CREATE EXTENSION btree_gist;\nCREATE TYPE uuidrange AS RANGE (\n SUBTYPE = UUID\n);\nCREATE TABLE v1_payload_offloaded_block_index (\n payload_inserted_at_date DATE NOT NULL,\n block_external_id_range uuidrange NOT NULL,\n index_file_key TEXT NOT NULL,\n CONSTRAINT v1_payload_offloaded_block_index_date_range_excl\n EXCLUDE USING GIST (payload_inserted_at_date WITH =, block_external_id_range WITH &&)\n);\nCREATE UNIQUE INDEX v1_payload_offloaded_block_index_uq_index_key ON v1_payload_offloaded_block_index (index_file_key);\nCREATE TABLE v1_payloads_olap_offloaded_block_index (\n payload_inserted_at_date DATE NOT NULL,\n block_external_id_range uuidrange NOT NULL,\n index_file_key TEXT NOT NULL,\n CONSTRAINT v1_payloads_olap_offloaded_block_index_date_range_excl\n EXCLUDE USING GIST (payload_inserted_at_date WITH =, block_external_id_range WITH &&)\n);\nCREATE UNIQUE INDEX v1_payloads_olap_offloaded_block_index_uq_index_key ON v1_payloads_olap_offloaded_block_index (index_file_key);": ERROR: extension "btree_gist" is not allow-listed for users in Azure Database for PostgreSQL (SQLSTATE 0A000)There could be other things going on, but we're still looking into it. I just wanted to file the extension issue immediately as it was pretty clear
AI Disclosure
no ai
Source: hatchet-dev/hatchet