Bug 146745
Summary: | Dead postgres can't be killed | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Zenon Panoussis <redhatbugs> |
Component: | postgresql | Assignee: | Tom Lane <tgl> |
Status: | CLOSED NOTABUG | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3 | CC: | hhorak |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-02-01 22:22:06 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Zenon Panoussis
2005-02-01 06:12:34 UTC
"Make a mess of your filesystem" isn't a reproducible step IMHO. In any case, if you've managed to hose your filesystem, why would you expect Postgres or any other userland application to be able to deal with that? The init script demonstrably does work properly when PG wasn't running, so I think you are blaming the messenger here ... Oh, it doesn't take hosing, just a reset that goes wrong. I just reproduced it like this: 1. Check that postgres is running and completely idle, i.e. nothing has actually accessed a database for a long time: # ls /var/run/postma* 2. Make sure your system won't be able to boot next time: # echo "/dev/hdz1 /blah ext3 defaults 1 2" >>/etc/fstab 3. Avoid damage: # sync 4. Press the reset button. At the next boot, give the root password for a shell. Fix fstab and try to reboot: # reboot You'll get stuck at "Stopping postgres" and the only way to get on from there is to press the reset button again. I subsequently repeated the whole procedure, but now with 4. # rm -f /var/run/postmaster* # reboot This got stuck in the exact same way, so it's not a simple matter of a rogue pidfile. BTW, messing up fstab and rebooting isn't even a necessary step. The thing is to get the system in a state where (a) postgress has died abruptly and (b) K15postgresql gets run. You might be able to get there with a simple 'killall -9 postmaster; reboot', but I didn't try that. How long did you wait exactly before deciding it was hung forever? There are some paths through the pg_ctl script that have sixty-second timeouts ... Not long enough. So I tried it again with 'killall -9 postmaster; reboot'. It got indeed stuck for about one minute, then returned "OK". |