Skip to content

RAISE NOTICE in extension scripts is silently dropped by CREATE/ALTER EXTENSION #315

Description

@zjyzh

Description

pg_tle's install and update scripts contain seven RAISE NOTICE statements meant to inform operators about role creation, disabled feature GUCs, and misconfigured passcheck_db_name / clientauth_db_name. None of them ever reach the client, because Postgres's execute_extension_script clamps client_min_messages and log_min_messages to at least WARNING for the duration of CREATE EXTENSION and ALTER EXTENSION UPDATE.

Steps to reproduce

  1. SET client_min_messages = notice;
  2. CREATE ROLE pgtle_admin NOLOGIN;
  3. CREATE EXTENSION pg_tle;

Expected outcome

NOTICE:  Role "pgtle_admin" already exists. Skipping.

Actual outcome

No output. The NOTICE is silently dropped by execute_extension_script's severity clamp.

Analysis

The same clamp affects all seven sites: pg_tle--1.0.0.sql:281, pg_tle--1.0.4.sql:348, pg_tle--1.1.1.sql:340, and pg_tle--1.3.4--1.4.0.sql:91,95,103,106.

Recommended fix: promote each RAISE NOTICE to RAISE WARNING — the lowest severity that survives the clamp — and update test/expected/*.out to match. I have a working patch with make installcheck green locally and can open a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions