From: | "Myers Brian D" <brian(dot)d(dot)myers(at)state(dot)or(dot)us> |
---|---|
To: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: [GENERAL] Streaming Replication Server Crash |
Date: | 2012-10-23 18:06:07 |
Message-ID: | 2C46E1CA0CA5954281928642A6308FB90142F28B@WPDHSEXCL04.dhs.sdc.pvt |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general |
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. Looks like 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(at)postgresql(dot)org [mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
Sent: Monday, October 22, 2012 10:21 PM
To: Craig Ringer
Cc: raghu ram; pgsql-admin(at)postgresql(dot)org; pgsql-general
Subject: Re: [ADMIN] [GENERAL] Streaming Replication Server Crash
Craig Ringer <ringerc(at)ringerc(dot)id(dot)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 it might 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(at)postgresql(dot)org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
From | Date | Subject | |
---|---|---|---|
Next Message | teyking2003 | 2012-10-24 00:58:29 | Re: Database in psql |
Previous Message | Craig Ringer | 2012-10-23 05:58:15 | Re: [ADMIN] Streaming Replication Server Crash |
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2012-10-23 18:18:23 | Re: database corruption questions |
Previous Message | Scott Marlowe | 2012-10-23 14:41:01 | Re: 9.1 to 9.2 requires a dump/reload? |