pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Database recovery in postgres 7.2.4.
3+ messages / 3 participants
[nested] [flat]

* Database recovery in postgres 7.2.4.
@ 2006-10-30 10:25 Santosh <ssbhujbal@gmail.com>
  2006-11-02 22:41 ` Re: Database recovery in postgres 7.2.4. Chris Browne <cbbrowne@acm.org>
  2006-11-06 20:08 ` Re: Database recovery in postgres 7.2.4. Scott Marlowe <smarlowe@g2switchworks.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Santosh @ 2006-10-30 10:25 UTC (permalink / raw)
  To: pgsql-sql

Hi All.

My setup is as follows:
OS: Sun Solaris 5.8.
Postgres: 7.2.4

I have very large database, which contain 15 tables and each table is
contain more than 10,00,000 records.

My application is parsing text data files and inserting records into
database.

When this process was running last night, machine was got down because
of power failure.

Today when I come back to office and I have compaired record count in
data files and in database and find that some records are missing in
database.

Then I have checked postgres log and found log similar to as follows:
=================================
DEBUG:  The DataBase system was not properly shut down
	Automatic recovery is in progress...
DEBUG:  Redo starts at (0, 1064)
=================================

I have read some WAL related stuff on postgres site but not found any
solution to recover those uncommited records.

Can any one tell me how to recover those missing records?

Thanks,
Santosh




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Database recovery in postgres 7.2.4.
  2006-10-30 10:25 Database recovery in postgres 7.2.4. Santosh <ssbhujbal@gmail.com>
@ 2006-11-02 22:41 ` Chris Browne <cbbrowne@acm.org>
  1 sibling, 0 replies; 3+ messages in thread

From: Chris Browne @ 2006-11-02 22:41 UTC (permalink / raw)
  To: pgsql-sql

"Santosh" <ssbhujbal@gmail.com> writes:
> Hi All.
>
> My setup is as follows:
> OS: Sun Solaris 5.8.
> Postgres: 7.2.4
>
> I have very large database, which contain 15 tables and each table is
> contain more than 10,00,000 records.
>
> My application is parsing text data files and inserting records into
> database.
>
> When this process was running last night, machine was got down because
> of power failure.
>
> Today when I come back to office and I have compaired record count in
> data files and in database and find that some records are missing in
> database.
>
> Then I have checked postgres log and found log similar to as follows:
> =================================
> DEBUG:  The DataBase system was not properly shut down
> 	Automatic recovery is in progress...
> DEBUG:  Redo starts at (0, 1064)
> =================================
>
> I have read some WAL related stuff on postgres site but not found any
> solution to recover those uncommited records.
>
> Can any one tell me how to recover those missing records?

If they were not committed, then there is no way to do so.

Uncommitted work is properly discarded when the database is brought
back online.
-- 
let name="cbbrowne" and tld="linuxfinances.info" in name ^ "@" ^ tld;;
http://linuxdatabases.info/info/sgml.html
"I've seen  a look in dogs'  eyes, a quickly vanishing  look of amazed
contempt,  and I  am convinced  that basically  dogs think  humans are
nuts."  -- John Steinbeck



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Database recovery in postgres 7.2.4.
  2006-10-30 10:25 Database recovery in postgres 7.2.4. Santosh <ssbhujbal@gmail.com>
@ 2006-11-06 20:08 ` Scott Marlowe <smarlowe@g2switchworks.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Scott Marlowe @ 2006-11-06 20:08 UTC (permalink / raw)
  To: Santosh <ssbhujbal@gmail.com>; +Cc: pgsql-sql

On Mon, 2006-10-30 at 04:25, Santosh wrote:
> Hi All.
> 
> My setup is as follows:
> OS: Sun Solaris 5.8.
> Postgres: 7.2.4

Just so you know, 7.2 is ancient. You should, at a minimum be running
the latest 7.2 release, 7.2.8.  You should really look into upgrading to
a later version as soon as possible.

> I have very large database, which contain 15 tables and each table is
> contain more than 10,00,000 records.
> 
> My application is parsing text data files and inserting records into
> database.
> 
> When this process was running last night, machine was got down because
> of power failure.
> 
> Today when I come back to office and I have compaired record count in
> data files and in database and find that some records are missing in
> database.

You may have lost data.  Hard to say from what you've told us.  How did
you determine that records are missing?

> Then I have checked postgres log and found log similar to as follows:
> =================================
> DEBUG:  The DataBase system was not properly shut down
> 	Automatic recovery is in progress...
> DEBUG:  Redo starts at (0, 1064)
> =================================

This is normal.  It's the messages after this you need to worry about. 
Did the logs say anything else after this?

> I have read some WAL related stuff on postgres site but not found any
> solution to recover those uncommited records.

If the records were committed, then they'd get put into the db by the
wal recovery process.  If the hardware (i.e. the hard drive and its
controller) wasn't lying about fsync.  If the hardware was lying, you
need to look into that (hint, IDE and many SATA drives lie about fsync)

> Can any one tell me how to recover those missing records?

there are some older tools laying about, like pgfsck that might help. 
I'd ask on admin or another list.  SQL isn't really the list for admin /
system problems...



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2006-11-06 20:08 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-10-30 10:25 Database recovery in postgres 7.2.4. Santosh <ssbhujbal@gmail.com>
2006-11-02 22:41 ` Chris Browne <cbbrowne@acm.org>
2006-11-06 20:08 ` Scott Marlowe <smarlowe@g2switchworks.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox