User Tools

Site Tools


how_to:database_issues

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
how_to:database_issues [2013/03/15 08:26] – [Database Issues] paulhow_to:database_issues [2013/06/24 08:41] – [Event Viewer Entries] paul
Line 11: Line 11:
 It is slightly less safe, but still usually OK, to have a UPS with automated shutdown of the PC. You still have to ensure that the PC is not just turned off without shutting down properly. It is slightly less safe, but still usually OK, to have a UPS with automated shutdown of the PC. You still have to ensure that the PC is not just turned off without shutting down properly.
  
-If you don't have either of these facilities, then make sure you turn off write-back caching in Windows.+If you don't have either of these facilities, then make sure you turn off write-back caching in Windows. (Note that 'Server' versions of Windows will usually have write-back caching disabled by default, because they often store critical data and run database servers, and 'Desktop' versions of Windows will usually have write-back caching enabled by default, because their data is usually less critical, and speed is considered more important than reliability).
  
 Exactly how you turn off write-back caching depends on your version of Windows, and the disk controller. Exactly how you turn off write-back caching depends on your version of Windows, and the disk controller.
Line 38: Line 38:
 If the PostgreSQL service doesn't start, or starts and immediately stops, there are a couple of things you can do: If the PostgreSQL service doesn't start, or starts and immediately stops, there are a couple of things you can do:
  
 +  * Look in the Windows //Application//event log for entries relating to PostgreSQL. See below for possible errors in the event log
   * Look in the VPOP3\pgsql\data\pg_log folder for a log file created at the time when you started VPOP3. If that is there, you can read that (using Notepad) and see if it reports any problems with files or 'relations'. If so, it might be a problem with a damaged database. See below for other possible error messages in the PostgreSQL log files   * Look in the VPOP3\pgsql\data\pg_log folder for a log file created at the time when you started VPOP3. If that is there, you can read that (using Notepad) and see if it reports any problems with files or 'relations'. If so, it might be a problem with a damaged database. See below for other possible error messages in the PostgreSQL log files
-  * Look in the Windows event log for entries relating to PostgreSQL 
  
 You can also try starting the PostgreSQL service manually: You can also try starting the PostgreSQL service manually:
  
-From a command prompt, run "runas /user:postgres cmd" (password is "vla8Pi4cluwrouDiERiU")+  * For VPOP3 v3 and v4, from a command prompt, run "runas /user:postgres cmd" (password is "vla8Pi4cluwrouDiERiU") 
 +  * For VPOP3 v5 and later, from a command prompt, run "runas /user:vpop3postgres cmd" (password is "Nc6ACboDt2jVL6")
  
 Then  Then 
Line 54: Line 55:
 See what response you get to the pg_ctl command See what response you get to the pg_ctl command
  
 +====Event Viewer Entries====
 +In the Windows Event Viewer, view the //Application// event log, then look for **Error** entries for the **PostgreSQL** source.
 +
 +Depending on your installation, the events may all be displayed as something like:
 +  The description for Event ID xxxx from source PostgreSQL cannot be found. Either the component that raises this event is not installed on your local computer....
 +  
 +If that's the case, don't worry, just look lower down in the event message. It will say something like 
 +  The following information was included with the event
 +  
 +It is that information you need to see. Some possible event messages we have seen are:
 +  
 +===pg_ctl: this data directory appears to be running a pre-existing postmaster===
 +If this is the case, then usually it means that a previous attempt to start PostgreSQL was made, but it timed out or something, and is now in a 'partially' running state. 
 +
 +To solve this, go to Windows TaskManager (Ctrl-Alt-Del - choose TaskManager), then go to the **Processes** tab and click **Show processes for all users**. Sort by **Image Name**, and **End Process** on all the **postgres.exe** processes. Once those are all ended, then you should be able to start the **VPOP3DB** service manually.
 ====PostgreSQL Log Entries==== ====PostgreSQL Log Entries====
-If you get **FATAL** entries in the PostgreSQL log files (in **VPOP3\pgsql\data\pg_log**) then they may give more information about why PostgreSQL could not start. Some log entries we have come across are below.+If you get **FATAL** or **PANIC** entries in the PostgreSQL log files (in **VPOP3\pgsql\data\pg_log**) then they may give more information about why PostgreSQL could not start. Some log entries we have come across are below.
  
 ===no pg_hba.conf entry for host "::1", user "postgres", database "postgres"=== ===no pg_hba.conf entry for host "::1", user "postgres", database "postgres"===
how_to/database_issues.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1