PolarGiraffe
PolarGiraffe

Reputation: 73

AWS Postgres setting pg_trgm.word_similarity_threshold

I'm trying to set the pg_trgm.word_similarity_threshold GUC parameter on an RDS postgres (13) instance.

I have tried setting it with a post-deployment SQL script:

SET pg_trgm.word_similarity_threshold = 0.5;
SELECT pg_reload_conf();

But this results in an error: Npgsql.PostgresException (0x80004005): 42501: permission denied for function pg_reload_conf

I have also tried setting it through terraform by passing it in the parameters list:

parameters = [
  {
    name         = "shared_preload_libraries"
    value        = "pg_cron,pg_stat_statements,pg_trgm"
    apply_method = "pending-reboot"
  },
  {
    name         = "pg_trgm.word_similarity_threshold"
    value        = "0.5"
    apply_method = "immediate" # I don't know if this is a static or dynamic variable
  }
]

Which results in the error: Error modifying DB Parameter Group: InvalidParameterValue: Could not find parameter with name: pg_trgm.word_similarity_threshold

Even though pg_trgm is a supported extension, this parameter does not seem to be available in the postgres parameter group. Is there any way to set this parameter in my AWS Postgres RDS?


Upvotes: 6

Views: 685

Answers (1)

tadejsv
tadejsv

Reputation: 2092

This is not seem possible. Two years ago it was promised that this would be implemented, but nothing has been done yet.

See the official answer: https://repost.aws/questions/QUhf2ksaV2SA-MWaw04M4U_Q/changing-pg-trgm-similarity-threshold-in-rds

Upvotes: 0

Related Questions