PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID15271
PG Version10.4
OSMac OS X, Linux
Opened2018-07-10 08:59:03+00
Reported byAkos Vandra
StatusWon't Fix

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      15271
Logged by:          Akos Vandra
Email address:      (redacted)
PostgreSQL version: 10.4
Operating system:   Mac OS X, Linux
Description:        

I am using the pg_trgm extension, and would like to change the
similarity_threshold GUC parameter default value.

Seems like when trying to alter a GUC parameter of an extension that was not
yet loaded into session memory, the ALTER DATABASE command returns with an
unexpected message, `ERROR:  permission denied to set parameter
"pg_trgm.similarity_threshold"`, although that is NOT the problem.

I understand this may have sever implications, but obviously the expected
behaviour would be to be able to set that GUC parameter regardless if the
extension has been loaded into session memory (and probably load it if
not).

Workaround:
  Before the `alter database` command issue a command such as `select
show_limit();` to load the extension into session memory.

Repro:
  1. CONNECT as superuser
  1. CREATE USER test PASSWORD 'test';
  2. CREATE DATABASE test OWNER test;
  3. DISCONNECT AND CONNECT as test user
  4. ALTER DATABASE test SET pg_trgm.similarity_threshold = 0.42;

Expected:
  Successful alter

Actual:
  ERROR:  permission denied to set parameter
"pg_trgm.similarity_threshold"

Workaround:

test=> alter database test set pg_trgm.similarity_threshold = 0.42;
ERROR:  permission denied to set parameter "pg_trgm.similarity_threshold"
test=> select show_limit();
 show_limit
------------
        0.2
(1 row)

test=> alter database test set pg_trgm.similarity_threshold = 0.42;
ALTER DATABASE

Workaround effect:

test=> select show_limit();
 show_limit
------------
        0.2
(1 row)

test=> \q
$ psql -U test -d test
psql (10.4)
Type "help" for help.

test=> select show_limit();
 show_limit
------------
       0.42
(1 row)

Messages

DateAuthorSubject
2018-07-10 08:59:03+00=?utf-8?q?PG_Bug_reporting_form?=BUG #15271: Documentation / Error reporting on GUC parameter change
2018-08-07 17:23:40+00Bruce MomjianRe: BUG #15271: Documentation / Error reporting on GUC parameter change
2018-08-07 19:10:09+00Tom LaneRe: BUG #15271: Documentation / Error reporting on GUC parameter change
2018-08-07 19:36:47+00Bruce MomjianRe: BUG #15271: Documentation / Error reporting on GUC parameter change
2018-08-07 20:50:53+00Akos VandraRe: BUG #15271: Documentation / Error reporting on GUC parameter change
2018-08-07 20:53:56+00Tom LaneRe: BUG #15271: Documentation / Error reporting on GUC parameter change
2018-08-07 21:11:16+00Akos VandraRe: BUG #15271: Documentation / Error reporting on GUC parameter change
2018-08-07 21:43:06+00Bruce MomjianRe: BUG #15271: Documentation / Error reporting on GUC parameter change