The pgagent crashes with the following error message when job step fails, even with on error = ignore
"terminate called after throwing an instance of 'std::__ios_failure'
what(): basic_filebuf::_M_convert_to_external conversion error: iostream error"
The issue is more common or started to appear after operating system upgrade(to Debian 11, 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27)) and postgres upgrade(from 9.6 to 13.11)
What's interesting is that not all errors in steps cause pgagent crash.
There is no problem when executing regular functions with some issues.
I noticed that the issue is visible when an SQL error is raised from inside dblinks which are extensively used in the step code.
Job step settings:
Kind: SQL
Connection type: Local
On error: Ignore
Job step sample code
SELECT schema.function_name(CURRENT_DATE);
inside
SELECT FROM dblink((SELECT FROM dblink_get_connection()), v_query ...
In case of any error in v_query the pgagent main process crashes
pgagent version
extension: 4.2
pgagent -v: Version: 4.2.1
Hi,
The pgagent crashes with the following error message when job step fails, even with on error = ignore "terminate called after throwing an instance of 'std::__ios_failure' what(): basic_filebuf::_M_convert_to_external conversion error: iostream error"
The issue is more common or started to appear after operating system upgrade(to Debian 11, 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27)) and postgres upgrade(from 9.6 to 13.11)
What's interesting is that not all errors in steps cause pgagent crash. There is no problem when executing regular functions with some issues. I noticed that the issue is visible when an SQL error is raised from inside dblinks which are extensively used in the step code.
Job step settings: Kind: SQL Connection type: Local On error: Ignore Job step sample code SELECT schema.function_name(CURRENT_DATE); inside SELECT FROM dblink((SELECT FROM dblink_get_connection()), v_query ... In case of any error in v_query the pgagent main process crashes pgagent version extension: 4.2 pgagent -v: Version: 4.2.1
I would be grateful for help