我有一个 PostgreSQL 8.4 数据库,安装时以日语为主要语言。我正在使用 psql.exe 从英文 Windows 7 客户端进行连接。有什么方法可以将显示给我的消息的 UI(例如帮助、\l 命令中的列标题等)更改为英语?
我知道我可以使用 \encoding 设置字符编码,但我真的想将 UI 语言从 ja_JP 更改为 en_US(或类似的)。
我在 psql 文档中看不到任何内容。有任何想法吗?
以下陈述有什么问题?
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO foo;
Run Code Online (Sandbox Code Playgroud)
我收到这个错误
ERROR: syntax error at or near "ALL"
LINE 2: ON ALL TABLES IN SCHEMA public TO foo;
Run Code Online (Sandbox Code Playgroud)
我在 Ubuntu 上使用 postgreSQL 8.3。
我有一个带有 9GB RAM、300GB HDD、3GB Swap、7 核的 VPS。操作系统是 CentOS 5.7 Final。
我在我的机器上运行了 postgres9.0,并进行了适当的调整(至少通过 PostgreSQL 的书/维基)。
大多数情况下,当一些复杂的查询运行时(复杂我的意思是选择最多 3 个连接),尽管我的 RAM 有大约 75% 未使用,但仍有大约 99% 的交换正在发生。
编辑:我在这里提到的空闲 RAM 是由 (free + buffered + cached) 计算的,'free -m' 显示的实际空闲几乎是 ~2%。因此,如果我一开始就错了,请纠正我。
此外,它搞砸了我的磁盘 IO,这在大多数情况下达到了 ~100% 并减慢了其他一切。(我倾向于认为我的磁盘有问题。)
我不明白发生这么多交换的原因。是因为上下文切换吗??我的处理器大部分时间都处于空闲状态,而在选择时间期间 IO 等待时间高达 30%。
如果有人能对此有所了解,我们将不胜感激。
谢谢。
我正在尝试在 Ubuntu 12.04 上使用 PostGreSQL 9.1 设置 PostGIS 数据库。我已经设置了数据库,创建了一个没有密码的用户帐户“jay”,在此处添加了第 2.5 节之后的空间功能,并将我的 pg_hba.conf 设置为local:
# "local" is for Unix domain socket connections only
local all all trust
Run Code Online (Sandbox Code Playgroud)
我可以使用 PGAdminIII 连接到数据库,无需密码即可连接,但是当我尝试通过 PostGIS 或 QuantumGIS 连接时连接失败。这是 QuantumGIS 中连接窗口的屏幕截图:

稍微调查一下问题,我遇到了这篇文章,这让我尝试使用psql -U jay -h localhost gis. psql提示我输入密码,因为我没有设置密码,我按回车键,然后它返回psql: fe_sendauth: no password supplied. 我再次尝试,这次提供我的 Ubuntu 用户密码,它返回
psql: FATAL: password authentication failed for user "jay"
FATAL: password authentication failed for user "jay"
Run Code Online (Sandbox Code Playgroud)
然后,我尝试了设置密码jay使用 …
我想关闭 postgresql 中的空闲连接并想设置 idle_in_transaction_session_timeout。我登录到 postgresql 并在提示符下输入 show idle_in_transaction_session_timeout 时收到以下错误消息:
[数据库]=> 显示 idle_in_transaction_session_timeout;
并收到以下错误消息:
错误:无法识别的配置参数“idle_in_transaction_session_timeout”
如果我输入 [database]=> SET SESSION idle_in_transaction_session_timeout = 3000; 收到以下错误消息:
错误:无法识别的配置参数“idle_in_transaction_session_timeout”
在 posrgresql 中在哪里咨询和设置这个变量?谢谢你。
我已将 postgresql、php 和 apache 安装到 Amazon Linux AMI。现在我想使用phpPgAdmin,它提示“您的PHP安装不支持PostgreSQL。您需要使用--with-pgsql配置选项重新编译PHP。”!如何为 Amazon Linux AMI 重新编译它?请建议。谢谢。
我正在尝试远程连接到我的 postgresql 数据库。我设置了两个运行 ubuntu 14.04 的虚拟机。我正在尝试使用第一个虚拟机连接到第二个虚拟机
psql -h 10.0.1.23 -U postgres -d postgres
Run Code Online (Sandbox Code Playgroud)
但我收到错误:
Could not connect to server: Connection refused
Is the server running on host "10.0.1.23" and accepting
TCP/IP connections on port 5432?
Run Code Online (Sandbox Code Playgroud)
我已经更改了 pg_hba.conf 并添加了
host all all 10.0.1.64/24 md5
host all all * md5
host all all 0.0.0.0/0 md5
Run Code Online (Sandbox Code Playgroud)
并更改了 postgresql.conf listen_address=" * "
试图允许所有传入连接。我还尝试更改防火墙设置,但我不确定端口是否正确侦听连接。
编辑:输出
netstat -an | grep -E '^tcp[^6].*LISTEN'
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 …Run Code Online (Sandbox Code Playgroud) 有谁知道除了RazorSQL之外我还可以使用免费的 PostgreSQL 数据库浏览器,因为它有 30 天的试用期?如果有类似于 SQlite 数据库浏览器的东西,重量轻且易于阅读,那就太好了。它不必只使用 PostgreSQL,它也可以是任何可以使用 PostgreSQL 的浏览器。
我正在寻找高于程序化文件操作、命令或 python 库级别的任何内容。似乎没有编辑文件的替代方法(假设http://www.postgresql.org/docs/9.2/static/auth-pg-hba-conf.html会提到替代方法)。
按照https://www.postgresql.org/download/linux/ubuntu/ 中的官方说明,我收到以下错误:
The following packages have unmet dependencies:
postgresql-10 : Depends: postgresql-client-10
Depends: libgssapi-krb5-2 (>= 1.14+dfsg) but 1.13.2+dfsg-5ubuntu2 is to be installed
Depends: libicu60 (>= 60.1-1~) but it is not installable
Depends: libpq5 (>= 9.3~) but it is not going to be installed
Depends: libssl1.1 (>= 1.1.0) but it is not installable
Recommends: sysstat but it is not going to be installed
Run Code Online (Sandbox Code Playgroud)
Linux发行版是: Ubuntu 16.04.5 LTS
我尝试了很多关于清除、升级 apt 的建议,但没有任何帮助。
是否可以在 Ubuntu 16.04.5 LTS 下安装 PostgreSQL 10?
另外,我现在无法安装 PostgreSQL …
postgresql ×10
amazon-ec2 ×1
apt ×1
centos ×1
database ×1
hard-drive ×1
installation ×1
linux ×1
memory ×1
php ×1
sql ×1
swap ×1
ubuntu-12.04 ×1
ubuntu-16.04 ×1
windows-7 ×1