Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-26 Thread Martijn van Oosterhout
On Mon, Apr 27, 2009 at 10:13:47AM +0800, Chen, Dongdong (GE > Healthcare) wrote: Checksum is my primitive thought, is there table > level checksum? Our objective is like this: If shutdown normally, OK. > If shutdown ABNORMALLY, then reboot the OS, check whether there is > database records loss or

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-26 Thread Chen, Dongdong (GE Healthcare)
> Row level: it would be very expensive to compute, store and keep up to date. > And it doesn't protect you from corruption elsewhere in the block. > Block level: there was some effort to implement it for 8.4, but it fell into > some deadly traps. Checksum is my primitive thought, is there ta

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-24 Thread Alvaro Herrera
Filip Rembiałkowski escribió: > OTOH, there could be some consistency check method... If postgres had block- > or row-level checksums, this could do. Row level: it would be very expensive to compute, store and keep up to date. And it doesn't protect you from corruption elsewhere in the block. B

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-24 Thread Filip Rembiałkowski
2009/4/24 Joshua D. Drake > On Fri, 2009-04-24 at 10:04 -0400, Alvaro Herrera wrote: > > Chen, Dongdong (GE Healthcare) escribió: > > > > > > When the OS starts up, it wants to detect whether there is data loss > > > in PostgreSQL from last shutdown, is there a method provided? > > > > Why would

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-24 Thread Joshua D. Drake
On Fri, 2009-04-24 at 10:04 -0400, Alvaro Herrera wrote: > Chen, Dongdong (GE Healthcare) escribió: > > > > When the OS starts up, it wants to detect whether there is data loss > > in PostgreSQL from last shutdown, is there a method provided? > > Why would the OS want to do that? That doesn't m

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-24 Thread Alvaro Herrera
Chen, Dongdong (GE Healthcare) escribió: > > When the OS starts up, it wants to detect whether there is data loss > in PostgreSQL from last shutdown, is there a method provided? Why would the OS want to do that? -- Alvaro Herrerahttp://www.CommandPrompt.com/ Pos

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-24 Thread Chen, Dongdong (GE Healthcare)
To: Chen, Dongdong (GE Healthcare) Cc: j...@commandprompt.com; Alvaro Herrera; pgsql-general@postgresql.org Subject: Re: [GENERAL] need help for PostgreSQL consistency check mechanism On Thu, Apr 23, 2009 at 8:24 PM, Chen, Dongdong (GE Healthcare) wrote: > I wanna know if there is any way

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-23 Thread Scott Marlowe
On Thu, Apr 23, 2009 at 8:24 PM, Chen, Dongdong (GE Healthcare) wrote: > I wanna know if there is any way or tool to detect the DB data loss or > damage and inform developer  the result before recovery? If there is > data loss, the DB could still open or not ? > Sometimes even if shutdown abnormal

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-23 Thread Chen, Dongdong (GE Healthcare)
. ChenDongdong -Original Message- From: Joshua D. Drake [mailto:j...@commandprompt.com] Sent: Friday, April 24, 2009 9:18 AM To: Chen, Dongdong (GE Healthcare) Cc: Alvaro Herrera; pgsql-general@postgresql.org Subject: Re: [GENERAL] need help for PostgreSQL consistency check mechanism On Fri

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-23 Thread Joshua D. Drake
c: pgsql-general@postgresql.org > Subject: Re: [GENERAL] need help for PostgreSQL consistency check > mechanism > > Chen, Dongdong (GE Healthcare) wrote: > > We are now working on database check mechanism in our application. The > > > situation is when server shutdown ab

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-23 Thread Chen, Dongdong (GE Healthcare)
, April 24, 2009 8:22 AM To: Chen, Dongdong (GE Healthcare) Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] need help for PostgreSQL consistency check mechanism Chen, Dongdong (GE Healthcare) wrote: > We are now working on database check mechanism in our application. The > situation i

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-23 Thread Alvaro Herrera
Chen, Dongdong (GE Healthcare) wrote: > We are now working on database check mechanism in our application. The > situation is when server shutdown abnormally, the postmaster.pid file > still exists when reboot, But the PostgreSQL database itself may not be > damaged. We just do not want to restore

[GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-23 Thread Chen, Dongdong (GE Healthcare)
We are now working on database check mechanism in our application. The situation is when server shutdown abnormally, the postmaster.pid file still exists when reboot, But the PostgreSQL database itself may not be damaged. We just do not want to restore from backups when the database is still good e