Updates of TIBCO Data Virtualization (TDV) metrics table may fail with errors

Updates of TIBCO Data Virtualization (TDV) metrics table may fail with errors

book

Article ID: KB0076547

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization 7.0.x and higher

Description

As the TDV instance is serving user's request, you may notice failed requests in the Studio's Requests console, when the metrics data is being stored in a Postgres-based datasource table.

Looking in our /logs/cs_server.log file, you may see entries similar to these:

Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(65535)
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178)
    ... 22 more

Chained Exception 1 : org.postgresql.util.PSQLException: ERROR: value too long for type character varying(65535)

 

Normally, the 'metrics_requests' table includes these 2 columns:  'description' and 'message'. If the metrics_requests table was created in a Postgres-based table, then these 2 columns are of type varchar(65535) as mentioned in the error message.

However, this column width may not be large enough to store very large sql requests that exceed this length. Thus, the resulting error occurs when TDV attempts to insert the too-large entries into the 'metrics_requests' table.

Issue/Introduction

This concerns the use the TDV metrics feature.

Resolution

If you are receiving these errors and verify that your 'description' and 'message' columns from the 'metrics_requests' table are of type varchar(65535), you can manually alter the column and increase the length suitably, up to the limits that Postgres will support.

The sql ALTER COLUMN command will need to be run outside the TDV application, by logging directly into the Postgres db with whatever means you have. Afterwards, re-introspect the datasource containing these metrics tables.Then disable and re-enable the metrics in TDV.

This should allow the metrics tables to store the very large sql requests that arrive in TDV.