Articles of postgresql

Munin Postgres插件:找不到DBD :: Pg

我试图激活一些Munin的Postgresql插件。 当我运行munin-node-configure –suggest | grep postgres munin-node-configure –suggest | grep postgres我得到以下输出: postgres_bgwriter | no | no [DBD::Pg not found, and cannot do psql yet] postgres_cache_ | no | no [DBD::Pg not found, and cannot do psql yet] postgres_checkpoints | no | no [DBD::Pg not found, and cannot do psql yet] postgres_connections_ | no | no […]

在Amazon Linux上安装Postgres服务器9.6

在Amazon Linux上安装postgres-server 9.6的最佳方法是什么? 我试着运行rpm -i https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-ami201503-96-9.6-2.noarch.rpm安装列出的版本在https://yum.postgresql.org/repopackages.php ,它安装没有错误,但我仍然没有service postgresql ,或psql ,或postgres用户。 我错过了什么?

Postgres磁盘IO非常高。 我能做些什么来立即减less它?

我知道更快的磁盘比我使用的将有所帮助,但这将需要更长的时间,我正在尝试使用一些紧急措施,以减less磁盘IO。 顶上几乎不断地报道红色的DSK使用。 这是为了postgres 8.3。 我的shared_buffers设置是24MB,尽pipe服务器有16GB的RAM没有被充分利用。 我的第一个想法是给数据库尽可能多的内存,但我不知道如何做到这一点(这是一个专用的数据库服务器)。 任何不需要重新启动的解决scheme是可取的,但我会采取我所能得到的。 谢谢!

如何设置shmall,shmmax,shmni等…一般和postgresql

我用PostgreSQL的文档来设置它,例如这个configuration: >>> cat /proc/meminfo MemTotal: 16345480 kB MemFree: 1770128 kB Buffers: 382184 kB Cached: 10432632 kB SwapCached: 0 kB Active: 9228324 kB Inactive: 4621264 kB Active(anon): 7019996 kB Inactive(anon): 548528 kB Active(file): 2208328 kB Inactive(file): 4072736 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 3432 kB Writeback: 0 kB […]

停止在Windows上启动PostgreSQL?

我有一个本地postgresql数据库用于开发目的,我不想每次启动Windows时都启动 – 我该如何阻止它启动!

如何将安全组链接到我的AWS RDS实例?

我在RDS上有一个postgres数据库设置。 它运行良好。 但是,我想将其链接到位于ELB后面的一组自动扩展EC2实例,这些实例都位于单个EC2 security group 。 我被告知可以将安全组的规则添加到使用我的EC2安全组作为源的RDS实例。 当我转到控制台并编辑RDS安全组时,我只能看到源列下的以下选项: Anywhere, Custom IP, and My IP 。 在列顶部popup的信息中,它表示: To specify a security group in another AWS account (EC2-Classic only), prefix it with the account ID and a forward slash, for example: 111122223333/OtherSecurityGroup. (看起来可能只适用于EC2-Classic) 它不让我input源下拉框。 在RDS部分,我注意到他们有option groups 。 然而,与我的postgres实例关联的默认选项组是不可编辑的。 因此,我试图创build一个新的组。 在这一点上,我发现postgres没有列为可用的engine 。 我select了mysql,而不是只是为了查看是否可以添加选项。 它看起来像我可以添加一个安全组到一个MySQL实例,但不是一个postgres实例。 Postgres的实例不支持这个预期的select吗?

我怎样才能检查我的数据库是否需要更多的内存?

你将如何检查你的postgresql数据库实例是否需要更多的RAM内存来处理他们当前的工作数据?

如何在bash脚本中设置postgresql用户密码

我想为默认的Postgresql服务器用户postgres设置一个密码。 我通过使用: sudo -u postgres psql # \password postgres 我想在很多机器上做这一步,所以我想创build一个bash脚本来做同样的事情。 如何在bash中做到这一点?

在Ubuntu上安装postgres软件包不可用

我正在用Ruby和Postgresbuild立一个VPS。 在我的本地机器上,我安装了postgresql 9.2.3(客户机和服务器),因此想要在我的VPS上安装它。 遵循这个博客文章的说明http://hendrelouw73.wordpress.com/2012/11/14/how-to-install-postgresql-9-1-on-ubuntu-12-10-linux/for在Ubuntu上安装postgres (唯一的区别是我试图安装9.2.3,他安装了9.1),我做了以下 sudo apt-get install postgresql-9.2.3 Reading package lists… Done Building dependency tree Reading state information… Done E: Unable to locate package postgresql-9.2.3 E: Couldn't find any package by regex 'postgresql-9.2.3' 但是,正如你所看到的,它找不到一个包postgresql-9.2.3 。 然而,我已经在我的本地机器上安装了这个软件包(我用Homebrew在我的Mac上安装了这个软件包)。 你能帮我理解我做错了什么吗? 更新我也尝试安装它,离开'3'结束,就像你看到下面,但它不工作,你可以看到。 sudo apt-get install postgresql-9.2 Reading package lists… Done Building dependency tree Reading state information… Done Package […]

Postmaster使用过多的CPU和磁盘写入

使用PostgreSQL 9.1.2 我看到过多的CPU使用率和大量的从postmaster任务写入磁盘。 即使我的应用程序几乎没有任何操作(每分钟10秒的插入),也会发生这种情况。 有一个合理的连接数打开然而。 我一直在试图确定什么在我的应用程序造成这一点。 我用postgresql很漂亮,到目前为止还没有到任何地方。 我已经在我的configuration文件中打开了一些日志logging选项,并查看了pg_stat_activity表中的连接,但是它们都是空闲的。 然而,每个连接消耗约50%的CPU,并且正在向磁盘写入〜15M / s(不读取任何内容)。 我基本上使用股票postgresql.conf很小的调整。 我很感激任何意见或指示我可以做什么来跟踪这个。 以下是top / iotop向我展示的样本: Cpu(s): 18.9%us, 14.4%sy, 0.0%ni, 53.4%id, 11.8%wa, 0.0%hi, 1.5%si, 0.0%st Mem: 32865916k total, 7263720k used, 25602196k free, 575608k buffers Swap: 16777208k total, 0k used, 16777208k free, 4464212k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND […]