IntersectMBO / cardano-db-sync

A component that follows the Cardano chain and stores blocks and transactions in PostgreSQL
Apache License 2.0
290 stars 160 forks source link

PostgeSQL error: `value too long for type character varying(65536)` #1273

Closed RdeWilde closed 2 years ago

RdeWilde commented 2 years ago

OS Your OS: Ubuntu

Versions cardano-graphql:7.0.0-mainnet cardano-graphql-hasura:7.0.0 cardano-db-sync:13.0.4 cardano-ogmios:v5.5.5-mainnet cardano-node:1.35.3 postgres:11.5-alpine

Build/Install Method Ansible + docker

Run method Docker

Additional context Around/after epoch 338, slot 60953227, block 7245000,

Problem Report

2022-09-27 09:49:28.526 UTC [396236] STATEMENT:  WITH "Asset__mutation_result_alias" AS (
UPDATE "public"."Asset" SET "decimals" = ($1)::integer,"description" = ($2)::text,"logo" = ($3)::text,
"metadataHash" = ($4)::bpchar,"name" = ($5)::text,"ticker" = ($6)::text,"url" = ($7)::text  WHERE (('true') 
AND ((((("public"."Asset"."assetId") = (($8)::bytea)) AND ('true')) AND ('true')) AND ('true'))) RETURNING * , 
CASE WHEN 'true' THEN NULL ELSE "hdb_catalog"."check_violation"('update check constraint failed')  END ), 
"Asset__all_columns_alias" AS (SELECT  "assetId" , "assetName" , "decimals" , "description" , "fingerprint" , 
"firstAppearedInSlot" , "logo" , "metadataHash" , "name" , "policyId" , "ticker" , "url"  FROM "Asset__mutation_result_alias" 
    ) SELECT  json_build_object('affected_rows', (SELECT  COUNT(*)  FROM "Asset__all_columns_alias"      ), 'returning', 
(SELECT  coalesce(json_agg("root" ), '[]' ) AS "root" FROM  (SELECT  row_to_json((SELECT  "_1_e"  FROM  (SELECT  
"_0_root.base"."assetId" AS "assetId"       ) AS "_1_e"      ) ) AS "root" FROM  (SELECT  *  FROM "Asset__all_columns_alias" 
WHERE ('true')     ) AS "_0_root.base"      ) AS "_2_root"      ) )        
2022-09-27 09:51:10.302 UTC [396236] ERROR:  value too long for type character varying(65536)
kderme commented 2 years ago

Is this from db-sync logs?

RdeWilde commented 2 years ago

This is from PostgreSQL logs.

I just noticed there's a duplicate issue in graphql repo: https://github.com/input-output-hk/cardano-graphql/issues/767

erikd commented 2 years ago

This really looks like a cardano-graphql issue.

erikd commented 2 years ago

Closing this as a dupe of https://github.com/input-output-hk/cardano-graphql/issues/767 .