简体   繁体   English

如何在亚马逊 RDS Postgres 13 上安装 pg_hint_plan

[英]How can I install pg_hint_plan on amazon RDS Postgres 13

I am trying to install pg_hint_plan in order to manipulate my query plans.我正在尝试安装pg_hint_plan以操纵我的查询计划。 on my amazon RDS with postgres 13.在我的亚马逊 RDS 上使用 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我使用CREATE EXTENSION pg_hint_plan成功添加了扩展,这使得扩展出现在已安装异常列表中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:例如,当我尝试强制执行文档中显示的错误时:

在此处输入图像描述

I get no error from the pg_hint_plan on my output, and its like the hint is ignored我的 output 上的 pg_hint_plan 没有收到任何错误,就像提示被忽略一样在此处输入图像描述

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据我了解,我不需要按照文档中的说明执行 LOAD 'pg_hint_plan',因为我使用的是 Amazon RDS

Before this will work you need to alter the database parameters for shared_preload_libraries to contain pg_hint_plan.在此之前,您需要更改 shared_preload_libraries 的数据库参数以包含 pg_hint_plan。 Then'll you'll need to bounce the cluster.然后你需要反弹集群。 After that it should work.之后它应该工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM