Postgres 12未安装在RHEL 7上的扩展名

发布于 2025-01-23 07:52:39 字数 1093 浏览 0 评论 0原文

希望在RHEL 7上的Postgres 12 dB上安装PGSTATTUPLE扩展名,以查看索引碎片。目前,我只安装了一个扩展名,这就是PLPGSQL扩展名。

执行“创建扩展PGSTATTUPLE”会导致以下错误:

SQL Error [58P01]: ERROR: could not open extension control file "/usr/pgsql-12/share/extension/pgstattuple.control": No such file or directory

我验证了pgstattuple.control不在/usr/usr/pgsql-12/share/share/扩展文件夹中。

在网上搜索,似乎表明需要安装PostgreSQL-Contrib才能获得PGSTATTUPLE扩展。因此,我执行了以下命令:

$  sudo yum install postgresql-contrib

不幸的是,YUM安装PostgreSQL-Contrib导致PGSTATTUPLE和其他扩展程序安装到/usr/pgsql-9.6/share/share/extension中 文件夹,不在我想要的/usr/usr/pgsql-12/share/伸展文件夹中。

为了咯咯笑,我尝试在/usr/pgsql-9.6/share/extension中复制所有pgstattuple*文件到/usr/usr/pgsql-12/share/extension/extension文件夹,然后尝试调用create greatent creatention pgstattuple,但这不起作用,但是另一个错误。

问题是:

  1. 我应该期望sudo yum安装postgresql-contrib真正安装了Postgres 12的PGSTATTUPLE扩展程序吗?还是还有其他一些Postgres 12的软件包名称?
  2. 这是我的红帽存储库配置的问题吗?
  3. 通常,安装Postgres 12的PGSTATTUPLE扩展名的命令是什么,以便PGSTATTUPLE文件最终输入/usr/pgsql-12/share/share/extension文件夹?

非常感谢您的建议。

谢谢。

Looking to install the pgstattuple extension on my Postgres 12 DB on RHEL 7 to see index fragmentation. Currently I only have one extension installed and that's the plpgsql extension.

Executing 'CREATE EXTENSION pgstattuple' results in the following error:

SQL Error [58P01]: ERROR: could not open extension control file "/usr/pgsql-12/share/extension/pgstattuple.control": No such file or directory

And I verified that the pgstattuple.control is not located in the /usr/pgsql-12/share/extension folder.

Searching around the net, seemed to indicate that the postgresql-contrib needed to be installed to get the pgstattuple extension. So I did the following command:

$  sudo yum install postgresql-contrib

Unfortunately the yum install postgresql-contrib resulted in the pgstattuple and other extensions being installed into the /usr/pgsql-9.6/share/extension
folder, and not in the /usr/pgsql-12/share/extension folder where I want them.

For giggles, I tried copying all the pgstattuple* files in /usr/pgsql-9.6/share/extension to /usr/pgsql-12/share/extension folder, and then tried calling CREATE extension pgstattuple, but that didn't work with another error.

Questions are:

  1. Should I expect sudo yum install postgresql-contrib to actually install the pgstattuple extension for Postgres 12?? Or is there some other package name for Postgres 12?
  2. Could this be some problem with my Red Hat Repository configuration?
  3. In general what's the command to install the pgstattuple extension for Postgres 12 so that the pgstattuple files will end up in /usr/pgsql-12/share/extension folder??

Really appreciate any suggestions you have.

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文