"Wes Sheldahl" <wes.sheldahl@xxxxxxxxx> writes: > I seem to have an unstable/unreliable installation of postgresql, and I'm > not sure how to troubleshoot it. > Symptoms: > $ psql postgres > psql: FATAL: semctl(851974, 3, SETVAL, 0) failed: Invalid argument AFAICS the only documented reason for that semctl to fail would be if someone had removed the SysV semaphores that Postgres creates for itself at startup. Is it possible you've got some script on the loose that periodically tries to clean out all the semaphores in the system? Try comparing the output of "ipcs -s" just after starting Postgres with the output after this symptom appears. It's probably worth asking if you've seen any other flaky behavior on this box --- if so I'd kinda wonder about bad RAM or some such. regards, tom lane