![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
A power failure led to failed postmaster restart using 7.4.6 (see output below). The short-term fix is usually to delete the pid file and restart. I often wonder why ipcs never seems to show the shared memory block in question? |
#3
| |||
| |||
|
|
"Ed L." <pgsql (AT) bluepolka (DOT) net> writes: A power failure led to failed postmaster restart using 7.4.6 (see output below). The short-term fix is usually to delete the pid file and restart. I often wonder why ipcs never seems to show the shared memory block in question? The shared memory block would certainly not still exist after a system reboot, so what we have here is a misleading error message. Looking at the code, the most plausible explanation appears to be that shmctl(IPC_STAT) is failing (which it ought to) and returning some errno code different from EINVAL (which is the case we are expecting to see). What platform are you on, and what does its shmctl(2) man page document as error conditions? |
#4
| |||
| |||
|
|
On Monday November 8 2004 6:16, Tom Lane wrote: "Ed L." <pgsql (AT) bluepolka (DOT) net> writes: A power failure led to failed postmaster restart using 7.4.6 (see output below). The short-term fix is usually to delete the pid file and restart. I often wonder why ipcs never seems to show the shared memory block in question? The shared memory block would certainly not still exist after a system reboot, so what we have here is a misleading error message. Looking at the code, the most plausible explanation appears to be that shmctl(IPC_STAT) is failing (which it ought to) and returning some errno code different from EINVAL (which is the case we are expecting to see). What platform are you on, and what does its shmctl(2) man page document as error conditions? Platform is Linux 2.4.20-30.9 on i686 (Pentium 4, I think). |
#5
| |||
| |||
|
|
A power failure led to failed postmaster restart using 7.4.6 (see output below). The short-term fix is usually to delete the pid file and restart. |
#6
| |||
| |||
|
|
BTW, do you know what all those shmem segments are for? My Linux box shows only one segment in use besides the ones Postgres is using. |
#7
| |||
| |||
|
|
I often wonder why ipcs never seems to show the shared memory block in question? |
#8
| |||
| |||
|
|
On Mon, 2004-11-08 at 17:47 -0700, Ed L. wrote: I often wonder why ipcs never seems to show the shared memory block in question? The permissions of the shared memory block and the semaphore arrays are 600. ipcs seems not to report objects which you cannot access. Run ipcs as root and you should see the PostgreQSL shared memory segment and semaphores. |
#9
| |||
| |||
|
|
On Tuesday November 9 2004 2:16, Oliver Elphick wrote: On Mon, 2004-11-08 at 17:47 -0700, Ed L. wrote: I often wonder why ipcs never seems to show the shared memory block in question? The permissions of the shared memory block and the semaphore arrays are 600. ipcs seems not to report objects which you cannot access. Run ipcs as root and you should see the PostgreQSL shared memory segment and semaphores. I don't see them when running ipcs as root, either. Not sure that would make sense given the shared memory is created as the same user running ipcs... |
#10
| |||
| |||
|
|
"Ed L." <pgsql (AT) bluepolka (DOT) net> writes: A power failure led to failed postmaster restart using 7.4.6 (see output below). The short-term fix is usually to delete the pid file and restart. Thinking some more about this ... does anyone know the algorithm used in Linux to assign shared memory segment IDs? |
![]() |
| Thread Tools | |
| Display Modes | |
| |