Thread: Strange PG error
I was trying to write a function which does a DES encryption for Postgres, which I would then link in as a C function. I got the function more or less working on its own, and then I tried to link it to PG. The first time I executed the function, the backend died. Then, I removed the Unix domain socket, and made sure that no postmasters were running, and tried to restart PG, and I got this error: > pg_ctl -D /home/data start pg_ctl: It seems another postmaster is running. Try to start postmaster anyway. pg_ctl: Cannot start postmaster. Is another postmaster is running? > IpcSemaphoreCreate: semget failed (No space left on device) key=5432015, num=16, permission=600 This type of error is usually caused by an improper shared memory or System V IPC semaphore configuration. For more information, see the FAQ and platform-specific FAQ's in the source directory pgsql/doc or on our web site at http://www.postgresql.org. FATAL 1: InitProcGlobal: IpcSemaphoreCreate failed Any tips on this? I checked all the processes, and definitely, no postmaster is running, no psql clients are running, no apache is running, nothing, and yet PG won't restart. How do I get it to restart? Also, I need some help on this function writing. More questions later... Thanks
I answered my own question: Under OpenBSD, use ipcs to see all the active shared memory and semaphores, and then use ipcrm -m and ipcrm -s to remove shared memory and semaphores which are allocated. After I cleared out all the semaphores and shared mem associated with Postgres, it then restarted just fine.
Dr. Evil writes: > > pg_ctl -D /home/data start > pg_ctl: It seems another postmaster is running. Try to start > postmaster anyway. > pg_ctl: Cannot start postmaster. Is another postmaster is running? > > IpcSemaphoreCreate: semget failed (No space left on device) Did you remove the postmaster.pid file in the data directory? > key=5432015, num=16, permission=600 > This type of error is usually caused by an improper > shared memory or System V IPC semaphore configuration. > For more information, see the FAQ and platform-specific > FAQ's in the source directory pgsql/doc or on our > web site at http://www.postgresql.org. > FATAL 1: InitProcGlobal: IpcSemaphoreCreate failed Run ipcclean, or a combinationof ipcs and ipcrm to remove the left over shared memory and/or semaphore segments.
Is this worth mentioning on the techdocs site? ;-) + Mini Me Austin Powers wrote: > > Dr. Evil writes: > > > > pg_ctl -D /home/data start > > pg_ctl: It seems another postmaster is running. Try to start > > postmaster anyway. > > pg_ctl: Cannot start postmaster. Is another postmaster is running? > > > IpcSemaphoreCreate: semget failed (No space left on device) > > Did you remove the postmaster.pid file in the data directory? > > > key=5432015, num=16, permission=600 > > This type of error is usually caused by an improper > > shared memory or System V IPC semaphore configuration. > > For more information, see the FAQ and platform-specific > > FAQ's in the source directory pgsql/doc or on our > > web site at http://www.postgresql.org. > > FATAL 1: InitProcGlobal: IpcSemaphoreCreate failed > > Run ipcclean, or a combinationof ipcs and ipcrm to remove the left over > shared memory and/or semaphore segments. > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html -- "My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there." - Indira Gandhi