Recoved deleted rows in postgresql

16,932

Try pg file dump.

Source.

EDIT: In the Postgres Wiki you can find the pg file dump git repository.

Share:
16,932
Valentin Brasso
Author by

Valentin Brasso

I've been working as a full stack developer for the past 9 years, on highly available online systems, with the majority of my experience in PHP, Javascript, and Python. Currently passionate about Machine Learning.

Updated on June 04, 2022

Comments

  • Valentin Brasso
    Valentin Brasso almost 2 years

    After running a query like

     delete from table tablename

    Can the records be recovered? From what I know Postgresql is just marking the records as deleted.

  • Valentin Brasso
    Valentin Brasso almost 13 years
    thank you! Do you have any more details? I would like to access a specific table on a spacific database and after reading the source (there is no other documentation) i'm not really sure how to proceed. Also, this is a production database.
  • Denis de Bernardy
    Denis de Bernardy almost 13 years
    I'm afraid not. Your question prompted me to google it. It's being maintained by Tom Lane, though, so chances are he'll reply himself if you ask for help on the pg-hackers list.
  • Scott Marlowe
    Scott Marlowe almost 13 years
    If you need help that doesn't involve actually hacking the code, ask your question on pgsql-general, not hackers. -hackers is for hacking code, not asking for support.
  • Craig Ringer
    Craig Ringer over 11 years
    You should also check out pg_dirtyread. See stackoverflow.com/questions/12472318/…
  • spinningarrow
    spinningarrow about 7 years
    The links don't seem to be working any more. Is there an updated link, or an alternative way of doing this?
  • Denis de Bernardy
    Denis de Bernardy about 7 years
    @spinningarrow: this answer is from years ago, but try: pgsql-hackers.postgresql.narkive.com/xP51LFSQ/… and wiki.postgresql.org/wiki/Pg_filedump