This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
how_to:database_issues [2013/08/30 12:36] – paul | how_to:database_issues [2013/09/30 11:35] – paul | ||
---|---|---|---|
Line 6: | Line 6: | ||
* [[Software conflicting with database]] | * [[Software conflicting with database]] | ||
* [[VPOP3DB/ | * [[VPOP3DB/ | ||
+ | * [[Database Size]] | ||
=====Database corruption===== | =====Database corruption===== | ||
If VPOP3 won't start even though the process is running, then that is often because the PostgreSQL service is not running. If the PostgreSQL service won't start, or keeps crashing, then it is probably because the database is corrupted. In VPOP3 versions 3 and 4, the PostgreSQL service is usually called ' | If VPOP3 won't start even though the process is running, then that is often because the PostgreSQL service is not running. If the PostgreSQL service won't start, or keeps crashing, then it is probably because the database is corrupted. In VPOP3 versions 3 and 4, the PostgreSQL service is usually called ' | ||
+ | * [[VPOP3DB won't start|VPOP3DB Database service won't start]] | ||
* [[Restore a database backup|Restoring a database]] | * [[Restore a database backup|Restoring a database]] | ||
* [[PostgreSQL server won't start due to damaged log files]] or missing pg_control file | * [[PostgreSQL server won't start due to damaged log files]] or missing pg_control file | ||
Line 16: | Line 18: | ||
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' | ||
- | * Look in the Windows // | ||
- | * 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 ' | ||
- | |||
- | You can also try starting the PostgreSQL service manually: | ||
- | |||
- | * For VPOP3 v3 and v4, from a command prompt, run "runas / | ||
- | * For VPOP3 v5 and later, from a command prompt, run "runas / | ||
- | |||
- | Then | ||
- | c: | ||
- | cd \vpop3\pgsql\bin | ||
- | pg_ctl -D " | ||
- | | ||
- | (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 // | ||
- | |||
- | Depending on your installation, | ||
- | 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 ' | ||
- | |||
- | To solve this, go to Windows TaskManager (Ctrl-Alt-Del - choose TaskManager), | ||
- | ====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 ":: | ||
- | 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:// | ||
- | |||
- | 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 | ||
- | < | ||
- | # TYPE DATABASE | ||
- | |||
- | # IPv4 local connections: | ||
- | host all | ||
- | # IPv6 local connections: | ||
- | #host all | ||
- | </ | ||
- | |||
- | Edit the last line to remove the # from the start, so it now says | ||
- | |||
- | < | ||
- | |||
- | # IPv4 local connections: | ||
- | host all | ||
- | # IPv6 local connections: | ||
- | host all | ||
- | </ | ||
- | |||
- | 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 ' |