projects
/
skytools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30bd668
)
detect postgres death in recovery
author
Marko Kreen
<markokr@gmail.com>
Thu, 13 Mar 2008 14:50:33 +0000
(14:50 +0000)
committer
Marko Kreen
<markokr@gmail.com>
Thu, 13 Mar 2008 14:50:33 +0000
(14:50 +0000)
python/walmgr.py
patch
|
blob
|
blame
|
history
diff --git
a/python/walmgr.py
b/python/walmgr.py
index 7b3c07b1d2689c78270728ba2f75241c3e087bcf..a26472f521d6825d1618ca3202664c22ae431f63 100755
(executable)
--- a/
python/walmgr.py
+++ b/
python/walmgr.py
@@
-890,6
+890,15
@@
class WalMgr(skytools.DBScript):
self.log.info("%s: not found, stopping" % srcname)
sys.exit(1)
+ # nothing to do, just in case check if parent is alive
+ try:
+ os.kill(os.getppid(), 0)
+ except OSError, ex:
+ if ex.errno == errno.ESRCH:
+ self.log.info("%s: not found, stopping" % srcname)
+ sys.exit(1)
+ self.log.warning("Parent aliveness check failed: "+str(ex))
+
# nothing to do, sleep
self.log.debug("%s: not found, sleeping" % srcname)
time.sleep(1)