postgresql - Rails Backup Gem 无法在从属设备上备份复制的 PostgreSQL 数据库,出现 pg_dump 权限错误
问题描述
运行备份失败并出现以下错误:
pg_dump: Error message from server: ERROR: canceling statement due to conflict with recovery
DETAIL: User query might have needed to see row versions that must be removed.
Errno::EPERM: Operation not permitted - 'pg_dump' returned exit code: 1
即使用户有权访问数据库上的 pg_dump
这是一个复制的数据库,备份过程在从属服务器上运行。
解决方案
为了使这项工作你必须启用
hot_standby_feedback = on
代替
/etc/postgresql/SQL_VERSION/main/postgresql.conf
然后使用重新启动postgresql
systemctl restart postgresql
推荐阅读
- java - 仅当它位于 Java 中数组的开头时才删除空值
- javascript - 使用 JavaScript 替换活动类无法正常工作
- regex - 正则表达式找到一行有错误的引号
- django - 在 Django 中禁用密码建议
- php - 在 Laravel 中获取用户 IP 地址而不安装软件包
- javascript - 在 node.js 中使用相对路径(以前的文件夹)访问文件
- download - Google 云端硬盘:为已注销的用户下载共享文件夹
- android - 在 Handler 线程的队列中添加匿名可运行对象会导致内存泄漏吗?
- python - 删除 Python 字符串中的第一个字符的时间复杂度是多少?
- mysql - MySQL Workbench,导入布尔值失败。1406 列的数据太长