This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
how_to:database_issues [2013/06/24 08:36] – [PostgreSQL Log Entries] paul | how_to:database_issues [2018/11/14 10:45] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
VPOP3 version 3 and later use the [[http:// | VPOP3 version 3 and later use the [[http:// | ||
- | =====Disk Caching===== | + | * [[Database & Disk Caching]] |
- | + | | |
- | One key point is that, like all other high-end databases, PostgreSQL should not be run on a server with disk level [[http:// | + | * [[VPOP3DB/ |
- | + | * [[Database Size]] | |
- | High-end RAID controllers often contain a battery backed write cache (BBWC) - in this case, if the power fails, the cached data is held in battery powered memory until the power is restored. After power is restored the cached data will be written to disk. In this case, using write back caching through the BBWC is perfectly safe (as long as power is not left off for so long that the batteries run down). | + | |
- | + | ||
- | 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. (Note that ' | + | |
- | + | ||
- | Exactly how you turn off write-back caching depends on your version of Windows, and the disk controller. | + | |
- | + | ||
- | The instructions below are for Windows 7 with standard SATA disks | + | |
- | + | ||
- | | + | |
- | | + | |
- | - Go to the **Policies** tab. Turn off **Enable write caching onthe device** and press **OK**\\ {{: | + | |
- | + | ||
- | =====Possible Conflicting Software===== | + | |
- | We strongly recommend that virus scanners exclude the VPOP3\pgsql\data folder and all subfolders. If a virus scanner decides to quarantine a file from within this folder structure, that can cause VPOP3 not to run, and could lead to data loss or corruption. | + | |
- | + | ||
- | We also recommend that backup software does not backup this folder structure. If a backup program opens a file for backup, and then the database server needs it, it can cause problems, and crashes. | + | |
=====Database corruption===== | =====Database corruption===== | ||
Line 35: | 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' | ||
- | |||
- | * 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==== | ||
- | ====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 ' |