Skip to content

Commit

Permalink
Adding pgsm_query_id for pgsm_store_error function
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamid Akhtar authored and codeforall committed Mar 1, 2023
1 parent 9ecd2cc commit cf5be6d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pg_stat_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1556,6 +1556,8 @@ pgsm_store_error(const char *query, ErrorData *edata)
entry = pgsm_create_hash_entry(0, queryid, NULL);
entry->query_text.query_pointer = pnstrdup(query, len);

entry->pgsm_query_id = get_pgsm_query_id_hash(query, len);

entry->counters.error.elevel = edata->elevel;
snprintf(entry->counters.error.message, ERROR_MESSAGE_LEN, "%s", edata->message);
snprintf(entry->counters.error.sqlcode, SQLCODE_LEN, "%s", unpack_sql_state(edata->sqlerrcode));
Expand Down

0 comments on commit cf5be6d

Please sign in to comment.