Re: [PATCH] Make ENOSPC not fatal in semaphore creation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Make ENOSPC not fatal in semaphore creation
Date
Msg-id 1409550.1634480964@sss.pgh.pa.us
Whole thread Raw
In response to [PATCH] Make ENOSPC not fatal in semaphore creation  (mp39590@gmail.com)
Responses Re: [PATCH] Make ENOSPC not fatal in semaphore creation
Re: [PATCH] Make ENOSPC not fatal in semaphore creation
List pgsql-hackers
mp39590@gmail.com writes:
> We might be in situation when we have "just enough" semaphores in the
> system limit to start but previously crashed unexpectedly, in that case
> we won't be able to start again - semget() will return ENOSPC, despite
> the semaphores are ours, and we can recycle them, so check this
> situation and try to remove the semaphore, if we are unable - give up
> and abort.

AFAICS, this patch could be disastrous.  What if the semaphore in
question belongs to some other postmaster?

Also, you haven't explained why the existing (and much safer) recycling
logic in IpcSemaphoreCreate doesn't solve your problem.

            regards, tom lane



pgsql-hackers by date:

Previous
From: mp39590@gmail.com
Date:
Subject: [PATCH] Make ENOSPC not fatal in semaphore creation
Next
From: Mikhail
Date:
Subject: Re: [PATCH] Make ENOSPC not fatal in semaphore creation