T
T
TIgorz2018-07-05 15:59:42
PostgreSQL
TIgorz, 2018-07-05 15:59:42

Why do some SQL queries pass with PGobject and PGInterval errors after updating Logstash?

After updating Logstash from version 6.0 to 6.3, errors appeared in requests:
After request: I get an error in the log:
SELECT * from dbmon_stat_activity()

[2018-07-02T14:00:00,384][WARN ][logstash.inputs.jdbc ] Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::OrgLogstash::MissingConverterException: Missing Converter handling for full class name=org.postgresql.util.PGobject, simple name=PGobject>}

The function itself that is called by this request:
CREATE OR REPLACE FUNCTION public.dbmon_stat_activity()
 RETURNS SETOF pg_stat_activity
 LANGUAGE plpgsql
 SECURITY DEFINER
AS $function$
DECLARE
 rcrd RECORD;
BEGIN
  FOR rcrd IN SELECT * FROM pg_stat_activity
  LOOP
    RETURN NEXT rcrd;
  END LOOP;
  RETURN;
END;
$function$

And after request https://pastebin.com/Lt5Lgdek
Error:
2018-07-02T14:00:00,388][WARN ][logstash.inputs.jdbc     ] Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::OrgLogstash::MissingConverterException: Missing Converter handling for full class name=org.postgresql.util.PGInterval, simple name=PGInterval>

In accordance with what is written here and here, I need to select the data type in the table. But tables are fine.
Logstash 6.3 Postgres 9.4 The
JDBC driver was updated to version 42.2.2, but this did not solve the problem.
And if I manually execute these requests, then everything works out as it should.
Thanks in advance for any advice.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question