Re: [GENERAL] Streaming Replication Server Crash

Поиск
Список
Период
Сортировка
От Myers Brian D
Тема Re: [GENERAL] Streaming Replication Server Crash
Дата
Msg-id 2C46E1CA0CA5954281928642A6308FB90142F28B@WPDHSEXCL04.dhs.sdc.pvt
обсуждение исходный текст
Ответ на Re: [GENERAL] Streaming Replication Server Crash  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
It looks like there's no standard way to do that. Here's how I'd do it in Python:

[CODE]
import signal
dict((k, v) for v, k in signal.__dict__.iteritems() if v.startswith('SIG'))
[/CODE]

In C, I guess I'd just do a switch statement on the common signal names between Windows and POSIX as exposed SIGNAL.H.
Lookslike all you get in Windows is: 

http://msdn.microsoft.com/en-us/library/xdkz3x12(v=vs.110).aspx

Brian

-----Original Message-----
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Monday, October 22, 2012 10:21 PM
To: Craig Ringer
Cc: raghu ram; pgsql-admin@postgresql.org; pgsql-general
Subject: Re: [ADMIN] [GENERAL] Streaming Replication Server Crash

Craig Ringer <ringerc@ringerc.id.au> writes:
> On 10/22/2012 08:52 PM, Tom Lane wrote:
>> But having said that, are we sure 10 is SIGUSR1 on the OP's platform?
>> AFAIK, that signal number is not at all compatible across different
>> flavors of Unix.  (I see SIGUSR1 is 30 on OS X for instance.)

> Gah. I incorrectly though that POSIX specified signal *numbers*, not
> just names. That does not appear to actually be the case. Thanks.

This isn't the first time I've wondered exactly which signal was meant in a postmaster child-crash report.  Seems like
itmight be worth expending some code on a symbolic translation, instead of just printing the number.  That'd be easy
enough(for common signal names) on Unix, but has anyone got a suggestion how we might do something useful on Windows? 

            regards, tom lane


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin




В списке pgsql-admin по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: [GENERAL] Streaming Replication Server Crash
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Cannot close 'an error has occurred' dialogue box