Re: 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.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 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.
Дата
Msg-id 1187595.1667318505@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 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>)
Список pgsql-hackers
=?gb2312?B?1dTG5Lnw?= <zhaoqg45023@hundsun.com> writes:
> 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
storedprocedure 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
savethe execution plan (plan) of the input SQL. If the stored procedure contains rollback, call the function
ReleaseCachedPlanto release the CachedPlan memory context. Therefore, before the function pgss_store collects
statisticalinformation, it is necessary to retain the stmt_location and stmt_len data required in pstmt, which will not
bereleased by the cCachedPlan memory context, resulting in random values for the parameters required by the function
pgss_store.?

Indeed ... thanks for the patch!

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: heavily contended lwlocks with long wait queues scale badly
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Commit fest 2022-11