PostgreSQL requires access to shared memory otherwise it refuses to start.
This error will almost always happen if you try to run PostgreSQL inside a jail
FATAL: could not create shared memory segment: Function not implemented
DETAIL: Failed system call was shmget(key=43714, size=56, 03600).
child process exited with exit code 1
allow.sysvipc;
Then restart your jail and continue with setup