Skip site navigation (1) Skip section navigation (2)

Win32 lost signals open item

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Cc: PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgreSQL(dot)org>
Subject: Win32 lost signals open item
Date: 2004-11-01 01:16:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-hackers-win32
We have this open item:

        o Handle "lost signals" on backend startup (eg. shutdown,
          config file changes, etc);  signals are SIG_DFL on startup

          The problem here is that the postmaster might send signals to a
          child before the signal handlers are installed.  We don't have
          this problem on unix because we fork and inherit the signal

Win32 uses a special socket to receive signals and does not use the
standard Unix signal mechanism.  However, the socket doesn't exist on
backend process start so there is possible loss of signal while the
backend starts.

The only solution I can think of for us is to set a PROC struct variable
when you can't send the Win32 backend a signal and have the backend
check this PROC variable after it starts listening for signals. 
However, there would still be a window where the signal could fail but
the backend could check the variable before the postmaster sets it so we
might just set the variable before a signal is sent and because it is
only checked when we start listening for signals it should be OK.

However, I don't think the postmaster reads/writes PROC so we would need
some other way of flagging the backend.  I bet there is some Win32 API
that might help us.

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073


pgsql-hackers by date

Next:From: James William PyeDate: 2004-11-01 01:25:52
Subject: Re: Version defines
Previous:From: Gaetano MendolaDate: 2004-11-01 01:11:45
Subject: Re: [PATCHES] [HACKERS] ARC Memory Usage analysis

pgsql-hackers-win32 by date

Next:From: Tom LaneDate: 2004-11-01 02:34:47
Subject: Re: [pgsql-hackers-win32] Win32 lost signals open item
Previous:From: Gevik BabakhaniDate: 2004-10-31 11:08:15
Subject: Re: Suggestion for holding the hands of the unwashed masses in Win32 land

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group