Emit WARNING instead of NOTICE in extension scripts#318
Open
zjyzh wants to merge 1 commit into
Open
Conversation
execute_extension_script() clamps client_min_messages and log_min_messages to at least WARNING for the duration of CREATE/ALTER EXTENSION, so NOTICE-level messages raised from extension scripts are silently dropped. Promote the seven NOTICE calls in pg_tle--1.0.0.sql, pg_tle--1.0.4.sql, pg_tle--1.1.1.sql, and pg_tle--1.3.4--1.4.0.sql (pgtle.register_feature body) to WARNING so the guidance reaches the client. Update regression expected output to match.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change
Bug
Seven
RAISE NOTICEcalls in the pg_tle install scripts never reach the client or the log. Operators get no guidance when they hit them.Root cause
Postgres's
execute_extension_script()clampsclient_min_messagesandlog_min_messagesto at leastWARNINGfor the duration ofCREATE/ALTER EXTENSION. NOTICE-level messages raised from inside an extension script are dropped.Fix
Promote the seven NOTICE calls to WARNING so the guidance survives the clamp. Sites: the "role already exists" guard in
pg_tle--1.0.0.sql/1.0.4.sql/1.1.1.sql, and four config-guidance messages insidepgtle.register_featureinpg_tle--1.3.4--1.4.0.sql.Branches
aws/pg_tle:main—raise-warning-in-extension-scripts, commitc248746.Testing
make installcheckon PostgreSQL 17.10, cold cluster: 10/10 regression + 107/107 TAP pass. Seven.outfiles updated to match the new severity label.License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.