-
Notifications
You must be signed in to change notification settings - Fork 895
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix exception detail passing in compression_policy_execute
In 2 instances of the exception handling _message and _detail were not properly set in compression_policy_execute leading to empty message and detail being reported.
- Loading branch information
Showing
2 changed files
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
@@ -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; | ||
|