How can I install pg_hint_plan on amazon RDS Postgres 13

2.3k views Asked by At

I am trying to install pg_hint_plan in order to manipulate my query plans. on my amazon RDS with postgres 13.

I successfully added the extension with CREATE EXTENSION pg_hint_plan which makes the extension appear in the list of installed exceptions select * from pg_catalog.pg_extension

However when I try to use hints on my queries, nothing happens. For example when i try to force an error as displayed on the documentation:

enter image description here

I get no error from the pg_hint_plan on my output, and its like the hint is ignored enter image description here

Is there any mistake on the configuration? From what I understood I dont need to do LOAD 'pg_hint_plan' as specified on the documentation because I am using Amazon RDS

1

There are 1 answers

5
Richard Wheeldon On

Before this will work you need to alter the database parameters for shared_preload_libraries to contain pg_hint_plan. Then'll you'll need to bounce the cluster. After that it should work.