BUG #17663: Connect to the database through jdbc, call the stored procedure containing the rollback statement,

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: 402142054(at)qq(dot)com
Subject: BUG #17663: Connect to the database through jdbc, call the stored procedure containing the rollback statement,
Date: 2022-10-26 08:59:52
Message-ID: 17663-a344fd0675f92128@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 17663
Logged by: zhaoqigui
Email address: 402142054(at)qq(dot)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();

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2022-10-26 09:00:58 BUG #17664: The subsctring() function with the char() text type does not work correctly
Previous Message Tom Lane 2022-10-26 01:35:00 Re: generated columns bug, see inconsistent data