Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Currently I'm trying to create the first PostgreSQL 9.5 cluster on Linux deploy android 5.0.2, and it seems to be a shared memory error.

FATAL: could not create shared memory segment: Function not implemented
Detail: Failed system call was shmget(key=1, size=40, 03600).
child process exited with exit code 1
initdb removing contents of data directory "/var/lib/postgresql/9.5/main"
Error: initdb failed

Can anyone help?

share|improve this question

Android doesn't support POSIX or System V shared memory. It has its own non-standard API, ashmem.

PostgreSQL does not support ashmem. To make the PostgreSQL server run on Android I expect you'd need to either use a custom kernel that does support either POSIX or System V shared memory, or add support for ashmem to PostgreSQL.

There's a also wrapper tool, android-shmem that emulates System V shared memory using ashmem transparently either by direct linking or LD_PRELOAD. You could try that.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.