Skip to content

Bulk insert/delete in Postgres tool registry - #122

Merged
RhysSullivan merged 1 commit into
mainfrom
bulk-tool-registry
Apr 9, 2026
Merged

Bulk insert/delete in Postgres tool registry#122
RhysSullivan merged 1 commit into
mainfrom
bulk-tool-registry

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Summary

  • register: Single INSERT ... ON CONFLICT UPDATE with all values instead of N individual inserts (900 round-trips → 1 for the GitHub API spec)
  • registerDefinitions: Same bulk pattern for schema definitions
  • unregister: Single DELETE ... WHERE id IN (...) instead of N individual deletes

Motivation

Adding large API specs (e.g. GitHub REST API with 900+ endpoints) on Cloudflare Workers was timing out because each tool was inserted individually through Hyperdrive.

Test plan

  • storage-postgres tests pass (14/14)
  • storage-file tests pass (10/10)
  • SDK tests pass (22/22, 1 pre-existing failure unrelated)

- register: single INSERT with bulk values instead of N individual inserts
- registerDefinitions: single INSERT with bulk values
- unregister: single DELETE with IN clause instead of N individual deletes
@RhysSullivan
RhysSullivan merged commit e695358 into main Apr 9, 2026
0 of 2 checks passed
RhysSullivan added a commit that referenced this pull request May 31, 2026
- register: single INSERT with bulk values instead of N individual inserts
- registerDefinitions: single INSERT with bulk values
- unregister: single DELETE with IN clause instead of N individual deletes
@RhysSullivan
RhysSullivan deleted the bulk-tool-registry branch June 11, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant