I have the same issue on different servers. All postgres UIDs and GIDs are set as 3003. After the change of UID and GID to 199 as Tim Bishop suggest the errors gone away !
I made some tests changing the UIDs and GIDs. UID GID Status 999 999 Postgres works 999 1000 Postgres works 1000 999 Postgres crash 1000 1000 Postgres crash The problem seems related to UID > 999 The postgresql source code compiled on the same server (xenial) works perfectly with UID and GID 3003 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1649877 Title: PostgreSQL dies with fatal semctl eror To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postgresql-9.5/+bug/1649877/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs