From: | tuanhoanganh <hatuan05(at)gmail(dot)com> |
---|---|
To: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Rescue data after power off |
Date: | 2010-07-19 16:57:07 |
Message-ID: | AANLkTim1qrJieHpjxjrqa_cre2_zK9mCl8-QNis8UYtv@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I have checked SHOW fsync, It is ON.
When I view table dmvt on PgAdmin, it only has 1332 rows, but command
"SELECT count(*) FROM dmvt" return 2449 rows.
My postgresql.conf is default of EnterpriseDB Postgres 8.3.9.
Please help me. Sorry for my English.
Tuan Hoang Anh.
On Mon, Jul 19, 2010 at 9:36 PM, Craig Ringer
<craig(at)postnewspapers(dot)com(dot)au>wrote:
> On 19/07/10 19:02, Jayadevan M wrote:
> >> Yesterday my server is power off, when i start server, some of table is
> > blank. Is there anyway to rescue it.
> > The "Power Off" - is it a planned/regular one? If yes, it makes sense to
> > have a normal shutdown of the database before the "Power Off".
>
> ... but even if you yank the power plug out of the back of the server,
> PostgreSQL should *NEVER* lose comitted data (unless you've told it its
> allowed to with a commit delay) and should certainly NEVER damage the
> database structure. It's one of PostgreSQL's most important and basic
> features.
>
> Unless you have set "fsync=off" in postgresl.conf, in which case the
> data loss is entirely your own fault, this should not happen. If you do
> not know if fsync is on or off, check by running "SHOW fsync;" in psql
> or PgAdmin. It should say "on". If it says "off" then you or someone
> else manually told the database not to try to protect your data from
> power loss or other failures.
>
> If you have lost data and fsync is on, then most likely your RAID
> controller/disks are doing something they should not be like caching
> writes in volatile storage. Make sure your RAID controller has write
> caching disabled or has a tested and working battery backup unit. If in
> doubt, your raid controller should have its write cache turned off, ie
> it should be in "write-through" mode and NOT in "write-back" mode.
>
> --
> Craig Ringer
>
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2010-07-19 16:58:42 | Re: Create table if not exists ... how ?? |
Previous Message | Jennifer Trey | 2010-07-19 16:53:42 | Re: Create table if not exists ... how ?? |