citusdata / citusdata/pg_shard
Expose remote error fields to client
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
When I attempt an `INSERT` that violates a primary key, the message seen by the client is a generic `WARNING` about a bad result from the worker node rather than the more meaningful message originally produced by the remote error:
``` sql
INSERT INTO members VALUES (1, 2, 3);
INSERT INTO members VALUES (1, 2, 3);
# WARNING: Bad result from shard1.demo:5432
# DETAIL: Remote message: duplicate key value violates unique constraint "members_id_key_10007"
# WARNING: Bad result from shard8.demo:5432
# DETAIL: Remote message: duplicate key value violates unique constraint "members_id_key_10007"
# ERROR: could not modify any active placements
```
This is a problem because:
- many languages don't capture the detail, just the error message
- the error message is cryptic in the extreme
Contributor guide
Assessment
This issue has not been assessed yet.