Can't start Postgresql
Given the error message, this is most probably happening under WSL (Windows Subsystem for Linux).

There have been recent changes in PostgreSQL related to fsync that turn out to be problematic with WSL. The specific PANIC error mentioned and a candidate solution is discussed in detail here:

WSL (windows subsystem on linux) users will need to turn fsync off as of 11.2

Except it's not just 11.2 because the changes were made in other supported versions like the 10.7 you're probably using if you're up to date in the 10.x branch.

Note that the workaround suggested in the subject, turning fsync to off, is not for production use. It's only okay if you're playing around with Postgres on WSL, and don't really care about the durability of your data. Some say that WSL itself is not for production use anyway.

As you're using PostgreSQL 10, it's possible that this problem will be mitigated in the next bugfix release, version 10.8. Two fixes have been committed in the 10.x branch last February that look like they might address the issue.