'Store exception summary in Postgres table

The idea is to store exception info for incoming requests through RPC. I have the table with few image link fields(main, mobile, additional) declared as VARCHAR(N), CSV files periodically downloaded from external resource and Celery task populating the table with bulk insert. After the table gets populated I need to check if all image links and their content are valid. If an image content passes through cloud NN content check, a new link will be generated pointing to post-processed content which replaces old link in the table accordingly. But if validation failed I need to write all exception info, kind of JSON format(status, message, type of image) to database, so API could receive it via RPC call and process later.

Should those field types be redefined? Other means except Postgres DB cannot be considered yet, if they don't propose significantly better approach.

The one idea is to use the table JSON field to write links from file with only one key-value pair. After validation it should be changed to either an error info or a new inserted link. The second idea is to use second table, which is not what I see logical, as the current table's already normalized.

  1. Is this a human approach by all means?
  2. Is this worthwhile to store exception info in a table's column?
  3. Maybe there is more graceful way to use instead?


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source