Add PgSQL notice handling in reset session paths

Register the PostgreSQL notice handler during reset session operations.
Previously, the handler was not set in this path, which could result
in unhandled backend notices.
v3.0_pgsql-resync-error-detection
Rahim Kanji 2 months ago
parent 1ffb4f13ac
commit 7a062a3444

@ -919,6 +919,7 @@ handler_again:
}
break;
case ASYNC_RESET_SESSION_END:
PQsetNoticeReceiver(pgsql_conn, &PgSQL_Connection::unhandled_notice_cb, this);
if (is_error_present()) {
NEXT_IMMEDIATE(ASYNC_RESET_SESSION_FAILED);
}
@ -1934,6 +1935,7 @@ void PgSQL_Connection::reset_session_start() {
assert(pgsql_conn);
reset_error();
async_exit_status = PG_EVENT_NONE;
PQsetNoticeReceiver(pgsql_conn, &PgSQL_Connection::notice_handler_cb, this);
reset_session_in_pipeline = is_pipeline_active();
if (reset_session_in_pipeline) {

Loading…
Cancel
Save