Bug report
Describe the bug
When resetting a Supabase preview branch, PGMQ queue creation fails with a sequence-related error. The pgmq.create() call for a queue (e.g., my_queue) references a sequence (pgmq.q_my_queue_msg_id_seq) that doesn't exist, causing the migration to fail.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Create a preview branch with migrations that create PGMQ queues:
CREATE EXTENSION IF NOT EXISTS pgmq;
SELECT pgmq.create('my_queue');
SELECT pgmq.create('my_queue_dlq');
- Let the branch build successfully (first build works).
- Reset the preview branch via the Supabase dashboard.
- The branch rebuilds and the migration fails.
- View the logs of the latest build
- See error
Expected behavior
- Queues should be created successfully on branch reset.
- PGMQ extension state should be consistent after reset.
- No sequence-related errors should occur.
Actual behavior
ERROR: relation "pgmq.q_my_queue_msg_id_seq" does not exist (SQLSTATE 42P01)
At statement: 786
SELECT pgmq.create('my_queue_dlq')
- The first queue (my_queue) may be created, but the second queue (my_queue_dlq) fails.
- This only occurs on branch reset, not on first build or new commits.
System information
- Supabase: Preview branch reset functionality
- PGMQ extension: Latest version (via CREATE EXTENSION IF NOT EXISTS pgmq)
- Migration file: Baseline migration or any migration creating PGMQ queues
Bug report
Describe the bug
When resetting a Supabase preview branch, PGMQ queue creation fails with a sequence-related error. The pgmq.create() call for a queue (e.g., my_queue) references a sequence (pgmq.q_my_queue_msg_id_seq) that doesn't exist, causing the migration to fail.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
Actual behavior
System information