-
Bug
-
Resolution: Done
-
Major
-
1.0.2.Final, 1.2.0.Beta2
-
None
A day or so after running the Postgres connector we notice that there is a query that is idle in transaction. After updating to 1.2.0Beta2 this is the latest transaction that is idle:
SELECT t.oid AS oid, t.typname AS name, t.typelem AS element, t.typbasetype AS parentoid, t.typtypmod as modifiers, t.typcategory as category, e.values as enum_values FROM pg_catalog.pg_type t JOIN pg_catalog.pg_namespace n ON (t.typnamespace = n.oid) LEFT JOIN (SELECT t.enumtypid as id, array_agg(t.enumlabel) as values FROM pg_catalog.pg_enum t GROUP BY id) e ON (t.oid = e.id) WHERE n.nspname != 'pg_toast' AND t.oid = $1
This query seems to be triggered during steady state operation when an unknown SQL type is encountered: https://github.com/debezium/debezium/blob/master/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/TypeRegistry.java#L66-L70
We have looked into our application and don't see any relevant logs however one time we did notice an NPE that was caught and logged in an older version 1.0.2Final
01:04:44.047 [debezium-postgresconnector-overwatch-change-event-source-coordinator-] WARN io.debezium.connector.postgresql.TypeRegistry - Failed to obtain SQL type information for type _qrtz_job_details via custom statement, falling back to TypeInfo#getSQLType() java.lang.NullPointerException: null at io.debezium.connector.postgresql.TypeRegistry$SqlTypeMapper.getSqlType(TypeRegistry.java:559) [debezium-connector-postgres-1.0.2.Final.jar:1.0.2.Final] at io.debezium.connector.postgresql.TypeRegistry.prime(TypeRegistry.java:371) [debezium-connector-postgres-1.0.2.Final.jar:1.0.2.Final] at io.debezium.connector.postgresql.TypeRegistry.<init>(TypeRegistry.java:122) [debezium-connector-postgres-1.0.2.Final.jar:1.0.2.Final] at io.debezium.connector.postgresql.connection.PostgresConnection.<init>(PostgresConnection.java:72) [debezium-connector-postgres-1.0.2.Final.jar:1.0.2.Final] at io.debezium.connector.postgresql.connection.pgoutput.PgOutputMessageDecoder.handleRelationMessage(PgOutputMessageDecoder.java:268) [debezium-connector-postgres-1.0.2.Final.jar:1.0.2.Final] at io.debezium.connector.postgresql.connection.pgoutput.PgOutputMessageDecoder.processMessage(PgOutputMessageDecoder.java:189) [debezium-connector-postgres-1.0.2.Final.jar:1.0.2.Final]
The idle transaction prevents our database from running automatic vacuum jobs and CPU steadily increases until it is overloaded. After deleting the idle transaction everything returns to normal.