BUG #17663: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.
赵其桂 <zhaoqg45023@hundsun.com>
From: 赵其桂 <zhaoqg45023@hundsun.com>
To: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Cc: "402142054@qq.com" <402142054@qq.com>
Date: 2022-11-01T12:57:00Z
Lists: pgsql-hackers
Attachments
- 0001-fix-BUG-17663-Connect-to-the-database-through-jdbc-c.patch (text/plain) patch 0001
Dear developer: The patch submitted addresses #17663 in the pgsql-bugs@lists.postgresql.org list. Problem: Add the parameters --enable-debug and --enable-cassert when the database is compiled. Driven by jdbc, the stored procedure containing rollbck is called, and an assertion occurs. Cause of the problem: Driven by jdbc, in the function BuildCachedPlan, the CachedPlan memory context is generated to save the execution plan (plan) of the input SQL. If the stored procedure contains rollback, call the function ReleaseCachedPlan to release the CachedPlan memory context. Therefore, before the function pgss_store collects statistical information, it is necessary to retain the stmt_location and stmt_len data required in pstmt, which will not be released by the cCachedPlan memory context, resulting in random values for the parameters required by the function pgss_store.?
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