Connecting Tech Pros Worldwide Help | Site Map

get back deleted data from a table in postgres

Newbie
 
Join Date: Jan 2008
Posts: 20
#1: Feb 26 '08
Hi,

I made a blunder mistake..i have deleted some 100 rows from my table in postgres and that is very important in my project..pls give me a solution how to recover those deleted data ..i dont have any dump of that table....

thanks in advance
Moderator
 
Join Date: Dec 2006
Location: Europe
Posts: 292
#2: Feb 26 '08

re: get back deleted data from a table in postgres


Quote:

Originally Posted by mndprasad

Hi,

I made a blunder mistake..i have deleted some 100 rows from my table in postgres and that is very important in my project..pls give me a solution how to recover those deleted data ..i dont have any dump of that table....

thanks in advance

do you have WAL files?
Newbie
 
Join Date: Jan 2008
Posts: 20
#3: Feb 26 '08

re: get back deleted data from a table in postgres


Quote:

Originally Posted by rski

do you have WAL files?



No rski,

i never heard abt that..i am a new bie..
so pls help me and what is the WAL files?
Newbie
 
Join Date: Jan 2008
Posts: 20
#4: Feb 26 '08

re: get back deleted data from a table in postgres


Quote:

Originally Posted by mndprasad

No rski,

i never heard abt that..i am a new bie..
so pls help me and what is the WAL files?

i have already google many hours and wasted my time
i have tried with toast data as suggested by some sites
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,500
#5: Feb 26 '08

re: get back deleted data from a table in postgres


If the transactions are commited , i don't think you can recover all those records back.
Newbie
 
Join Date: Jan 2008
Posts: 20
#6: Feb 26 '08

re: get back deleted data from a table in postgres


Quote:

Originally Posted by debasisdas

If the transactions are commited , i don't think you can recover all those records back.



NO,i have not committed the transaction
Moderator
 
Join Date: Dec 2006
Location: Europe
Posts: 292
#7: Feb 26 '08

re: get back deleted data from a table in postgres


Quote:

Originally Posted by mndprasad

NO,i have not committed the transaction

if you're begginer you probably do not understand what mnsprasad says because
the question is if you start the transaction using 'begin transaction' command before deleting rows and and do not confirm that transaction. I'm afraid you do not, you just delete rows (using delete command) if so it means that the transaction have been confirmed.
When you delete rows they phisically still exists in a table until you call the 'vacuum' command, but i don't know if there is a way do restore that rows, i do not know a software which do that (postgres do not).
WAL is a way to do a incremental buckups, using it you can restore a database. More on postgresql.org.
Newbie
 
Join Date: Jan 2008
Posts: 20
#8: Feb 27 '08

re: get back deleted data from a table in postgres


Quote:

Originally Posted by rski

if you're begginer you probably do not understand what mnsprasad says because
the question is if you start the transaction using 'begin transaction' command before deleting rows and and do not confirm that transaction. I'm afraid you do not, you just delete rows (using delete command) if so it means that the transaction have been confirmed.
When you delete rows they phisically still exists in a table until you call the 'vacuum' command, but i don't know if there is a way do restore that rows, i do not know a software which do that (postgres do not).
WAL is a way to do a incremental buckups, using it you can restore a database. More on postgresql.org.


Thank u..rski
I have just deleted a table ...if anyone knows how to recover deleted data pls reply me
Reply


Similar PostgreSQL Database bytes