Slow seeding when having a large seed file and an anonymous block.
Maintainers usually reply within 1 day
@7ttp is already working on this.
Since Sep 21, 2026.
Assessment
This issue has not been assessed yet.
Description
Affected area
Seeding
Supabase CLI version
2.117.0
Operating system
linux x64
Installation method
No response
Command
supabase db reset
Actual output
Very slow seed execution, over one minute
Expected behavior
Fast seed, as fast as when directly running with postgres, milliseconds at most.
Steps to reproduce
Have a seed file that looks like
DO $$
BEGIN
/* 1 MB block of SQL code */
END $$;
Run the seed, e.g. by supabase db reset.
This takes over a minute to run, even if the sql itself is fast.
Removing the anonymous block makes it fast. It looks like the seed sql parser has some quadratic complexity for finding the closing $$.
Other tags with open/close semantics also cause slowness, like /* ... */ comments, a large file with those is also slow. Single line comments -- are not slow.
Crash report ID
No response
Docker and service versions
Additional context
No response
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 531
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 347
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/cli
-
✨ Feature supabase/cli
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
stack: the HTTP gateway closes idle keep-alive connections after 5 s, so a client whose event loop is blocked gets ECONNRESET (`fetch failed`) on its next requestPossibly taken @7ttp claimed this 4 days ago. Open🐛 Bug supabase/cli
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
supabase/cli#6975 · 1 assignee ·
Maintainers usually reply within 1 day
-
📘 Docs supabase/cli
Difficulty 1/5 Under an hour Newbie friendliness 88/100
supabase/cli#6974 · 1 comment ·
Maintainers usually reply within 1 day
-
🐛 Bug supabase/cli
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
stack: functions serve fails without a TTY because the default output format is one it rejectsPossibly taken @7ttp claimed this 1 day ago. Open🐛 Bug supabase/cli
Difficulty 3/5 Half a day Newbie friendliness 68/100
supabase/cli#7010 · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
[Bug] remember() with special characters in namespace hangs until timeout instead of returning 400Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MystenLabs/MemWal#1133 · 1 comment ·
Maintainers usually reply within 1 day
-
bug user-priority/P2
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Effect-TS/effect#8881 · 1 comment ·
Maintainers usually reply within 1 day