Skip to content

Bound memory use in all_shortest_paths - #2584

Open
rioriost wants to merge 1 commit into
apache:masterfrom
rioriost:codex/age-shortest-path-oom
Open

rioriost wants to merge 1 commit into
apache:masterfrom
rioriost:codex/age-shortest-path-oom

Conversation

@rioriost

Copy link
Copy Markdown
Contributor

all_shortest_paths built every agtype path before returning the first row. With many equal-length paths, this could exhaust backend memory and delay cancellation.

This change retains bounded path IDs and builds path values as rows are returned. On PostgreSQL 18.6, all 42 AGE regression tests pass. The 117,649-path reproducer completes without OOM, and a 100 ms statement timeout cancels the full query promptly.

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