Werk #17124: mk_postgres: Fix 'Argument list too long'

Component Checks & agents
Title mk_postgres: Fix 'Argument list too long'
Date Jul 4, 2024
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.4.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0p18 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.2.0p35 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

The execution of large queries might run into an OS specific restriction regarding the length of arguments. In order to bypass the above error we use psql -f <FILE_PATH> instead of using echo, cat or similar for passing the SQL to pyql.

To the list of all Werks