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
how_to:database_issues [2013/08/30 11:36] paulhow_to:database_issues [2018/11/14 10:45] (current) – external edit 127.0.0.1
Line 6: Line 6:
   * [[Software conflicting with database]]   * [[Software conflicting with database]]
   * [[VPOP3DB/PostgreSQL service not starting|VPOP3DB Service not starting]]   * [[VPOP3DB/PostgreSQL service not starting|VPOP3DB Service not starting]]
 +  * [[Database Size]]
  
 =====Database corruption===== =====Database corruption=====
Line 16: Line 17:
  
 Our chargeable support service will be able to help with this if necessary. Note that we cannot guarantee recovering data, as that will depend on how badly the database has been damaged, and when the latest good backup was. Our chargeable support service will be able to help with this if necessary. Note that we cannot guarantee recovering data, as that will depend on how badly the database has been damaged, and when the latest good backup was.
-=====PostgreSQL service not starting===== 
-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 
- 
-You can also try starting the PostgreSQL service manually: 
- 
-  * 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  
-  c: 
-  cd \vpop3\pgsql\bin 
-  pg_ctl -D "C:\vpop3\pgsql\data" start  
-   
-(If your VPOP3 is installed in a different directory, change the above paths as appropriate) 
- 
-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==== 
-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"=== 
-This usually happens if the PC where VPOP3 is installed used to only have IPv4 installed, and has now had IPv6 added. The PostgreSQL configuration needs altering to support IPv6. 
- 
-Usually this only happens on Windows XP - earlier versions of Windows do not support IPv6, and later versions support IPv6 by default. Windows XP needs to have [[http://support.microsoft.com/kb/2478747|IPv6 manually installed]] 
- 
-To fix this problem, go to the **VPOP3\pgsql\data** folder on the server and edit the **pg_hba.conf** file using a plain text editor such as Notepad. 
- 
-Near the bottom of that file you should see a section saying 
-<code> 
-# TYPE  DATABASE        USER            CIDR-ADDRESS            METHOD 
- 
-# IPv4 local connections: 
-host    all             all             127.0.0.1/32            md5 
-# IPv6 local connections: 
-#host    all             all             ::1/128                 md5 
-</code> 
- 
-Edit the last line to remove the # from the start, so it now says 
- 
-<code># TYPE  DATABASE        USER            CIDR-ADDRESS            METHOD 
- 
-# IPv4 local connections: 
-host    all             all             127.0.0.1/32            md5 
-# IPv6 local connections: 
-host    all             all             ::1/128                 md5 
-</code> 
- 
-In some cases the last two lines may not exist, in which case you can simply copy those lines from the example above and paste them into your pg_hba.conf file 
- 
-You will then need to restart the PostgreSQL service in Windows. Note that sometimes PostgreSQL cannot close down properly, and there will be unwanted 'postgres.exe' processes visible in Windows TaskManager on the Processes tab. If so, then end those processes manually, before restarting the service. 
how_to/database_issues.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1