Wow that's a very unusual problem. PostgreSQL usually recovers from that kind of thing easily. The only scenarios where I can picture this happening is if there was a power loss and a battery in a RAID got depleted or the same scenario with consumer grade SATA drives because they often lie about the cache state when an fsync is called.<br><br><span style="font-family:Prelude, Verdana, san-serif;"><br><br></span><span id="signature"><div style="font-family: arial, sans-serif; font-size: 12px;color: #999999;">-- Sent from my HP Pre3</div><br></span><span style="color:navy; font-family:Prelude, Verdana, san-serif; "><hr align="left" style="width:75%">On Nov 24, 2014 12:58 PM, Glennie, Jonathan - 0443 - MITLL <jrglenni@ll.mit.edu> wrote: <br><br></span><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Phew… blowing away the pgsql commit log allowed it to start up successfully.  There may have been items in there that were lost, but I’ll take that any day over having to recreate the entire server from scratch.  Thanks for your help!   <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> spacewalk-list-bounces@redhat.com [mailto:spacewalk-list-bounces@redhat.com] <b>On Behalf Of </b>Glennie, Jonathan - 0443 - MITLL<br><b>Sent:</b> Monday, November 24, 2014 11:32 AM<br><b>To:</b> spacewalk-list@redhat.com<br><b>Subject:</b> Re: [Spacewalk-list] Postgresql Fails to Start After Datastore Failure<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I found the log file… looks like it is complaining that it cannot complete the autorecovery and the database needs to be restores from backup.  Unfortunately all of my VM snapshots got hosed and that was my backup…. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I’m still hoping there is a way I can attempt to repair the schema while preserving the data… in the process of trying to re-run the spacewalk-setup.  <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:spacewalk-list-bounces@redhat.com">spacewalk-list-bounces@redhat.com</a> [<a href="mailto:spacewalk-list-bounces@redhat.com">mailto:spacewalk-list-bounces@redhat.com</a>] <b>On Behalf Of </b>Glennie, Jonathan - 0443 - MITLL<br><b>Sent:</b> Monday, November 24, 2014 10:13 AM<br><b>To:</b> <a href="mailto:spacewalk-list@redhat.com">spacewalk-list@redhat.com</a><br><b>Subject:</b> Re: [Spacewalk-list] Postgresql Fails to Start After Datastore Failure<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I had received the lock error message before so I did start by removing that file.  It removed that error message but it was still saying Failed whenever I tried to start the service.  <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Are there any commands that I can use to stat the DB manually in a more verbose way so I can get some additional info on what’s failing?   Or is there any “repair” command I can use from spacewalk to re-install the service but not overwrite the database?   <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:spacewalk-list-bounces@redhat.com">spacewalk-list-bounces@redhat.com</a> [<a href="mailto:spacewalk-list-bounces@redhat.com">mailto:spacewalk-list-bounces@redhat.com</a>] <b>On Behalf Of </b>Waldirio Manhães Pinheiro<br><b>Sent:</b> Friday, November 21, 2014 8:05 PM<br><b>To:</b> <a href="mailto:spacewalk-list@redhat.com">spacewalk-list@redhat.com</a><br><b>Subject:</b> Re: [Spacewalk-list] Postgresql Fails to Start After Datastore Failure<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hello Jon,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>You can check in /var/lib/pgsql/data, check if you have a file named postmaster.pid, if yes, you can remove (rm postmaster.pid) and restart or start the postgresql daemon.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>[root@spacewalk ~]# service postgresql start<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>if you check, will be recreated the file<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal>[root@spacewalk data]# ll postmaster.pid<o:p></o:p></p></div><div><p class=MsoNormal>-rw-------. 1 postgres postgres 45 Nov 21 23:03 postmaster.pid<o:p></o:p></p></div><div><p class=MsoNormal>[root@spacewalk data]#<o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The problem normally is, if your db are running and for any reason you lost the connection with the directory, the file will still there and when you try to restart, the file will not be rewrite and the daemon will not start.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Try it and tell me if fix your problem.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Take Care and have a great weekend.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><br clear=all><o:p></o:p></p><div><div><div><p class=MsoNormal>______________<br>Atenciosamente<br>Waldirio<br>msn: <a href="mailto:waldirio@gmail.com" target="_blank">waldirio@gmail.com</a><br>Skype: waldirio<br>Site: <a href="http://www.waldirio.com.br" target="_blank">www.waldirio.com.br</a><br>Blog: <a href="http://blog.waldirio.com.br" target="_blank">blog.waldirio.com.br</a><o:p></o:p></p></div><div><p class=MsoNormal>LinkedIn: <a href="http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646" target="_blank">http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646</a><br>PGP: <a href="http://www.waldirio.com.br/public.html" target="_blank">www.waldirio.com.br/public.html</a><o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Fri, Nov 21, 2014 at 6:36 PM, Glennie, Jonathan - 0443 - MITLL <<a href="mailto:jrglenni@ll.mit.edu" target="_blank">jrglenni@ll.mit.edu</a>> wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hello-<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Our spacewalk server failed badly the other day when the underlying datastore went offline.  The system boots but when spacewalk tries to start up, the postgresql service fails to start.  I have checked /var/log/messages for any indication as to why, but there is nothing I can find.  I’ve also checked in /var/lib/pqsql/pgstatrtup.log but the entries in there seem old and not relevant to the current situation.  <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Does anyone know where or how I might go about starting the service in some kind of debug mode to try and get a better idea of what’s going on, or if there are logs that get saved somewhere that I haven’t found yet?  I’m definitely not very well versed in postgrest DB maintenance or troubleshooting, so any help would be greatly appreciated.  Thanks in advance.<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>-Jon<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div><p class=MsoNormal><br>_______________________________________________<br>Spacewalk-list mailing list<br><a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br><a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></body></html>