Thread
Commits
-
pg_stat_statements: fetch stmt location/length before it disappears.
- ca4c6764b3ee 12.13 landed
- a9fdb48b737d 13.9 landed
- 8b0a5cf3fe48 15.1 landed
- 56083ff3015b 10.23 landed
- 495e73c2079e 16.0 landed
- 149e00192fa1 11.18 landed
- 0f2f5645a1f3 14.6 landed
-
BUG #17663: Connect to the database through jdbc, call the stored procedure containing the rollback statement,
The Post Office <noreply@postgresql.org> — 2022-10-26T08:59:52Z
The following bug has been logged on the website: Bug reference: 17663 Logged by: zhaoqigui Email address: 402142054@qq.com PostgreSQL version: 13.8 Operating system: x86_64、arm Description: Machine: arm, x86 Version: pg13, pg14, pg15 (debug) version Tools: psql, vscode, IDEA, jdbc (postgresql-42.4.0.jar) Problem description: Connect to the database through jdbc, call the stored procedure containing the rollback statement, the database triggers an assertion, and the database is in recovery mode. Error log: STATEMENT: call mycommitproc($1) TRAP: FailedAssertion("query_location <= strlen(query)", File: "pg_stat_statements.c", Line: 1261) java code snippet: Statement stmt = conn.createStatement(); stmt.execute("create temp table proc_test (some_val bigint)"); stmt.execute( "CREATE OR REPLACE PROCEDURE myrollbackproc(a INOUT bigint) AS 'BEGIN INSERT INTO proc_test values(a); rollback; END;' LANGUAGE plpgsql"); stmt.close(); PreparedStatement cs = conn.prepareStatement("call myrollbackproc(?)"); cs.setInt(1, 3); cs.execute();