Skip to content

Complete close() of a lazy PG prepared statement that was never executed - #1764

Open
sharanggupta wants to merge 1 commit into
eclipse-vertx:masterfrom
sharanggupta:pg-close-unexecuted-lazy-statement
Open

sharanggupta wants to merge 1 commit into
eclipse-vertx:masterfrom
sharanggupta:pg-close-unexecuted-lazy-statement

Conversation

@sharanggupta

Copy link
Copy Markdown

Fixes #1763

close() on a lazily prepared statement that was never executed did nothing, so its future never completed. It now completes, and the statement is marked closed so that a later execution fails instead of preparing it. The test runs against PostgreSQL in both prepared statement test classes.

When PREPARE fails with an indeterminate type error, PG falls back to a
statement prepared on its first execution. Closing such a statement before
any execution did nothing, so the returned future never completed.

Complete the close and mark the statement closed, so that a later execution
fails instead of preparing it.

Signed-off-by: Sharang Gupta <sharang@sharanggupta.dev>
Assisted-by: Anthropic Claude (claude-opus-5-5)
@vietj vietj added this to the 5.3.0 milestone Oct 29, 2026

This branch has not been deployed

No deployments
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.

Closing a lazily prepared PG statement that was never executed never completes

2 participants