Re: Win32 semaphore patch

From: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: Win32 semaphore patch
Date: 2006-04-21 03:29:45
Message-ID: e29jq0$2quk$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote
> "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu> writes:
> > I intentionally use *unnamed* semaphores to avoid these problems -- even
if
> > the semaphores didn't go away (as Magus pointed out, if all processes
can
> > exit gracefully, this won't happen), we won't worry about them --
Creating
> > semahpores will still succeed because there is no existent same named
> > semaphores will bother it.
>
> Except that eventually you run the kernel out of resources. We were
> forced to confront that point very early when dealing with the SysV
> API, because of the remarkably low resource limits it traditionally
> has, but long-term resource leaks are never a good idea in any software.
>
> Or are you designing this according to the widespread view that Windows
> system uptimes are measured in small numbers of days anyway?
>

/* BTW: I should use "evently" instead of "gracefully" in the above
sentence. */

Maybe I missed the point here: If we really run out of kernel resources, I
don't think we can do much even with named semaphores - because the resource
leaked may not belong to any Postgres processes and we can't clean them up.

Regards,
Qingqing

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-04-21 06:04:40 Re: Win32 semaphore patch
Previous Message Tom Lane 2006-04-21 03:01:22 Re: Win32 semaphore patch