Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception detail passing in compression_policy_execute #6254

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .unreleased/pr_6254
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fixes: #6254 Fix exception detail passing in compression_policy_execute

Thanks: @fetchezar for reporting an issue with compression policy error messages
6 changes: 6 additions & 0 deletions sql/policy_internal.sql
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ BEGIN
BEGIN
PERFORM @[email protected]_chunk(chunk_rec.oid, if_compressed => true);
EXCEPTION WHEN OTHERS THEN
GET STACKED DIAGNOSTICS
_message = MESSAGE_TEXT,
_detail = PG_EXCEPTION_DETAIL;
RAISE WARNING 'decompressing chunk "%" failed when compression policy is executed', chunk_rec.oid::regclass::text
USING DETAIL = format('Message: (%s), Detail: (%s).', _message, _detail),
ERRCODE = sqlstate;
Expand All @@ -122,6 +125,9 @@ BEGIN
BEGIN
PERFORM @[email protected]_chunk(chunk_rec.oid);
EXCEPTION WHEN OTHERS THEN
GET STACKED DIAGNOSTICS
_message = MESSAGE_TEXT,
_detail = PG_EXCEPTION_DETAIL;
RAISE WARNING 'compressing chunk "%" failed when compression policy is executed', chunk_rec.oid::regclass::text
USING DETAIL = format('Message: (%s), Detail: (%s).', _message, _detail),
ERRCODE = sqlstate;
Expand Down