Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pgagent crash after job step error #33

Open
dlasak opened this issue Dec 18, 2023 · 0 comments
Open

Pgagent crash after job step error #33

dlasak opened this issue Dec 18, 2023 · 0 comments

Comments

@dlasak
Copy link

dlasak commented Dec 18, 2023

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

@dlasak dlasak changed the title Pgagent crashes after job step error Pgagent crash after job step error Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant