linux - postgresql 何时需要写入文件“pg_logical/replorigin_checkpoint.tmp”?
问题描述
Postgres(版本 10.10)在我的机器上崩溃(数据库连接变得不可能)。我检查了日志并看到
2019-10-11 15:46:41.262 UTC [30233] postgres_prod@syntax_prod LOG: could not receive data from client: Connection reset by peer
2019-10-11 17:41:06.104 UTC [2001] PANIC: could not write to file "pg_logical/replorigin_checkpoint.tmp": No space left on device
2019-10-11 17:41:06.364 UTC [1999] LOG: checkpointer process (PID 2001) was terminated by signal 6: Aborted
2019-10-11 17:41:06.364 UTC [1999] LOG: terminating any other active server processes
2019-10-11 17:41:06.364 UTC [1326] postgres_prod@syntax_prod WARNING: terminating connection because of crash of another server process
2019-10-11 17:41:06.364 UTC [1326] postgres_prod@syntax_prod DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
...
我认为问题发生在
PANIC: could not write to file "pg_logical/replorigin_checkpoint.tmp": No space left on device
但是我的机器上还剩下 77 GB(我刚刚重新启动了 Postgres,到目前为止一切正常)。所以我不太了解 PANIC 错误消息。我想了解更多关于 postgres 必须写入文件“pg_logical/replorigin_checkpoint.tmp”的信息可能有助于我理解出了什么问题。所以我正在寻找这方面的信息。
解决方案
但我的机器上还剩 77 GB
大概您在错误发生时没有,或者可用空间位于要使用的错误分区上。错误后可能有很多临时文件被清理了,所以现在的可用空间并不意味着你当时有可用空间。也许您可以在不同的分区上设置一个临时表空间,这样它就无法在空间不足的情况下运行其他东西并使整个系统崩溃?
我想了解更多关于 postgres 必须写入文件“pg_logical/replorigin_checkpoint.tmp”的信息可能有助于我理解出了什么问题。
我很确定它不会。但这是检查点逻辑复制进度的一部分。它创建一个新文件,然后以原子方式将其重命名为旧文件。
推荐阅读
- clojure - Clojure 读取文件或电子表格
- haskell - 无法将预期类型“Int”与实际类型“a”匹配
- javascript - 单击处理程序变量仅全局
- python - 在 tf.keras 的 GAN 实现中正确设置 .trainable 变量
- sql - 如何在 Hive/Spark SQL 中使用窗口函数删除重叠
- python - SWIG 在 conda 中的 Python 模块:我必须在哪里放置哪个文件?
- c# - 不知道如何将 API 数据中的项目放入列表中以将它们显示到视图中
- javascript - 在 ASP MVC .Net Core 中哪里使用/放置 jQuery?
- python - 计算一个类别代表的百分比
- android - Android,模态底部工作表对话框,高度