Subject: Rollback table data.

From: Dinesh Chandra 12108 <[email-masked]>
Date: Wed, 7 Jun 2017 11:33:26 +0000

Dear Expert,

Is there any way to rollback table data in PostgreSQL?

Regards,
Dinesh Chandra
|Database administrator (Oracle/PostgreSQL)| Cyient Ltd. Noida.
------------------------------------------------------------------
Mobile: +91-9953975849 | Ext 1078 [email-masked]<mailto:[email-masked]>
Plot No. 7, NSEZ, Phase-II ,Noida-Dadri Road, Noida - 201 305,India.

________________________________

DISCLAIMER:

This email may contain confidential information and is intended only for the use of the specific individual(s) to which it is addressed. If you are not the intended recipient of this email, you are hereby notified that any unauthorized use, dissemination or copying of this email or the information contained in it or attached to it is strictly prohibited. If you received this message in error, please immediately notify the sender at Infotech or [email-masked] and delete the original message.

---

From: Moreno Andreo <[email-masked]>
Date: Wed, 7 Jun 2017 14:42:44 +0200

Il 07/06/2017 13:33, Dinesh Chandra 12108 ha scritto:

Dear Expert,

Is there any
way to rollback table data in PostgreSQL?

Not knowing anything else about your what you want to do and what
context you're in, I can only say that AFAIK, once you COMMITted a
transaction, no rollback is possible.

A very quick google search gave me this:

https://stackoverflow.com/questions/12472318/can-i-rollback-a-transaction-ive-already-committed-data-loss

There's a long, detailed post from Craig Ringer that gives you some
advise on how to proceed (given that a committed transaction cannot
be ROLLBACKed)

Take a look, I hope it's applicable to your scenario.

HTH

Moreno.-

---

From: Andreas Kretschmer <[email-masked]>
Date: Wed, 7 Jun 2017 14:48:41 +0200

> Is there any way to rollback table data in PostgreSQL?
if you are looking for somewhat similar to flashback in oracle the 
answer is no.

Regards, Andreas

-- 
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com

-- 
Sent via pgsql-performance mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

---

From: Anthony Sotolongo <[email-masked]>
Date: Wed, 7 Jun 2017 09:23:03 -0400

HI, If you dont vaccum the table, You can read data modified with 
pg_dirtyread extension, but be carefull ;-)

https://github.com/omniti-labs/pgtreats/tree/master/contrib/pg_dirtyread

Regards
On 07/06/17 07:33, Dinesh Chandra 12108 wrote:
> *Regards,*
> *Dinesh Chandra*
> *|Database administrator (Oracle/PostgreSQL)| Cyient Ltd. Noida.*
>
> *------------------------------------------------------------------*
>
> ------------------------------------------------------------------------
>
> DISCLAIMER:
>
> This email may contain confidential information and is intended only 
> for the use of the specific individual(s) to which it is addressed. If 
> you are not the intended recipient of this email, you are hereby 
> notified that any unauthorized use, dissemination or copying of this 
> email or the information contained in it or attached to it is strictly 
> prohibited. If you received this message in error, please immediately 
> notify the sender at Infotech or [email-masked] and delete the 
> original message.

---

From: Scott Marlowe <[email-masked]>
Date: Wed, 7 Jun 2017 18:15:44 -0600

> Is there any way to rollback table data in PostgreSQL?

You really need to give us more details. PostgreSQL has the ability,
through continuous archiving, to roll back to a previous point in
time. This is for the whole database ccluster though and not just one
table. BUT you can do it on a whole other machine, get the table data
you want, and put it into the production database etc.

Got more details?

---

From: phb07 <[email-masked]>
Date: Sat, 10 Jun 2017 09:04:51 +0200

Hi Dinesh,

> if you are looking for somewhat similar to flashback in oracle the 
Well, if this is what you are looking for, the E-Maj extension may help 
you. In few words, it allows 1) to log updates on tables sets (using 
triggers), 2) to set marks on these tables sets when they are in a 
stable state and 3) to travel back and forth to these marks.
Some pointers:
- pgxn to download a stable version : https://pgxn.org/dist/e-maj/ (the 
downloadable zip file also contains a presentation that may help to 
quickly get a good view of the extension - doc/emaj.2.0.1_doc_en.pdf)
- on-line documentation : http://emaj.readthedocs.io/
- github projects : https://github.com/beaud76/emaj and 
https://github.com/beaud76/emaj_ppa_plugin

Best regards. Philippe.