We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7be0d5 commit 7016e71Copy full SHA for 7016e71
1 file changed
ext/pdo_pgsql/pgsql_statement.c
@@ -86,10 +86,9 @@ static int pgsql_stmt_dtor(pdo_stmt_t *stmt)
86
res = PQexec(H->server, q);
87
efree(q);
88
} else {
89
- /* Inside a transaction, already aborted, or connection is unusable:
90
- * skip DEALLOCATE. On servers that reject it (e.g. Aurora DSQL) it
91
- * would poison the transaction (GH-21869); on any server the server
92
- * frees the prepared statement when the transaction ends. */
+ /* Outside PQTRANS_IDLE, skip DEALLOCATE: on libpq < 17 some servers
+ * (e.g. Aurora DSQL) reject it and poison the tx (GH-21869). The
+ * statement is session-scoped, so it's freed on disconnect. */
93
res = NULL;
94
}
95
#else
0 commit comments