PostreSQL 10 не запускается в Ubuntu 18.04, работающем в подсистеме Windows для Linux - PullRequest
1 голос
/ 04 апреля 2019

Недавно я сделал новую установку Ubuntu 18.04 на Windows 10 с использованием подсистемы Windows для Linux (WSL). Затем я установил PostgreSQL 10 и смог успешно запустить сервер базы данных. Затем я вошел на сервер через PGAdmin 4.4 и установил расширение PostGIS 2.5.2. Затем я собирался импортировать данные через pg_restore, когда PGAdmin сказал, что потерял соединение с сервером PostgreSQL. Я попытался перезапустить, и я получил следующие ошибки в моем журнале:

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, и то же самое случилось снова! У меня была предыдущая установка установки, описанной выше, которая работала нормально. У кого-нибудь есть предложения относительно того, что может быть причиной этой проблемы?

ОБНОВЛЕНИЕ: А ответил на вопрос ниже.

Ответы [ 2 ]

1 голос
/ 05 мая 2019

Итак, после некоторых дальнейших исследований я обнаружил, что с последним обновлением PostgreSQL предыдущее «не удалось очистить грязные данные». Предупреждения переросли в Panics, я исправил проблему, оставив fsync = on и добавив data_sync_retry = true в postgresql.conf , Я надеюсь, что это полезно для всех, кто сталкивается с той же проблемой. Похоже, что проблема известна и будет исправлена ​​в будущем, см. https://github.com/Microsoft/WSL/issues/645.

0 голосов
/ 04 апреля 2019

Похоже, что WSL не поддерживает все необходимые системные вызовы для PostgreSQL. Вы пробовали установить версию для Windows? Вы можете получить его здесь:

https://www.postgresql.org/download/windows/

...