database - PostgreSQL 10 无法在 Linux 的 Windows 子系统上运行的 Ubuntu 18.04 上启动

标签 database postgresql ubuntu windows-subsystem-for-linux

我最近使用适用于 Linux 的 Windows 子系统 (WSL) 在 Windows 10 上全新安装了 Ubuntu 18.04。然后我安装了 PostgreSQL 10 并成功启动了数据库服务器。然后我通过 PGAdmin 4.4 登录到服务器并安装了 PostGIS 2.5.2 扩展。当 PGAdmin 说它失去了与 PostgreSQL 服务器的连接时,我正准备通过 pg_restore 导入数据。我尝试重新启动,但我的日志中出现以下错误:

2019-04-04 15:46:12.561 DST [47] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2019-04-04 15:46:12.561 DST [47] LOG:  listening on IPv6 address "::", port 5432
2019-04-04 15:46:12.563 DST [47] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-04-04 15:46:12.614 DST [48] LOG:  database system was shut down at 2019-04-04 15:42:36 DST
2019-04-04 15:46:12.661 DST [47] LOG:  database system is ready to accept connections
2019-04-04 15:46:13.247 DST [55] [unknown]@[unknown] LOG:  incomplete startup packet
2019-04-04 15:46:53.541 DST [49] PANIC:  could not flush dirty data: Function not implemented
2019-04-04 15:46:53.543 DST [47] LOG:  checkpointer process (PID 49) was terminated by signal 6: Aborted
2019-04-04 15:46:53.543 DST [47] LOG:  terminating any other active server processes
2019-04-04 15:46:53.543 DST [68] postgres@postgres WARNING:  terminating connection because of crash of another server process
2019-04-04 15:46:53.543 DST [68] postgres@postgres 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.
2019-04-04 15:46:53.543 DST [68] postgres@postgres HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2019-04-04 15:46:53.543 DST [52] WARNING:  terminating connection because of crash of another server process
2019-04-04 15:46:53.543 DST [52] 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.
2019-04-04 15:46:53.543 DST [52] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2019-04-04 15:46:53.549 DST [47] LOG:  all server processes terminated; reinitializing
2019-04-04 15:46:53.569 DST [69] LOG:  database system was interrupted; last known up at 2019-04-04 15:46:12 DST
2019-04-04 15:46:53.569 DST [69] PANIC:  could not flush dirty data: Function not implemented
2019-04-04 15:46:53.575 DST [47] LOG:  startup process (PID 69) was terminated by signal 6: Aborted
2019-04-04 15:46:53.575 DST [47] LOG:  aborting startup due to startup process failure
2019-04-04 15:46:53.579 DST [47] LOG:  database system is shut down
2019-04-04 15:46:53.579 DST [70] postgres@postgres FATAL:  the database system is in recovery mode

我尝试全新安装 Ubuntu 18.04 和 PostgreSQL 10,同样的事情又发生了!我之前安装了上述设置,运行良好。有没有人对可能导致此问题的原因有任何建议?

更新:A 回答了以下问题。

最佳答案

所以在进一步研究之后,我发现随着最新的 PostgreSQL 更新,之前的“无法刷新脏数据”警告升级为 Panics,我通过保留 fsync=on 并将 data_sync_retry = true 添加到 postgresql.conf 来解决问题.我希望这对遇到同样问题的其他人有用。看起来这个问题是已知的,将来会得到解决,请参阅,https://github.com/Microsoft/WSL/issues/645 .

关于database - PostgreSQL 10 无法在 Linux 的 Windows 子系统上运行的 Ubuntu 18.04 上启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55519413/

相关文章:

ubuntu - Monodevelop 无法在 ubuntu 上启动?

database - 如何在 Data Mapper 中加载一对多关系?

php - 根据月份向数据库插入值?

postgresql - 使用 JPA 进行 Sprint 引导 - 创建 bean 名称时出错 'entityManagerFactory' - driverClassName 需要 jdbcUrl

postgresql - Plpgsql 似乎正在删除和插入而不是更新 - 为什么?

mysql - 在 Ubuntu 上向 init.d 添加服务

javascript - MySQL 在 Sequelize 5 中返回 STRING 而不是 JSON

mysql - 查询查找给定数字属于给定表中的任何范围

java - 通知 postgres 对 java 应用程序的更改

ubuntu - 安装 MEAN-CLI 时出错