pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
help:how to rollback postgresql to several minutes ago
3+ messages / 2 participants
[nested] [flat]

* help:how to rollback postgresql to several minutes ago
@ 2016-04-14 10:06 刘剑 <liujian@raintai.com>
  2016-04-14 12:23 ` Re: help:how to rollback postgresql to several minutes ago Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: 刘剑 @ 2016-04-14 10:06 UTC (permalink / raw)
  To: pgsql-bugs

hello


please help,


 I had written an update sql without where condition to my table, then updated whole table.
So how can i rollback this?




thank you very much.

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

* Re: help:how to rollback postgresql to several minutes ago
  2016-04-14 10:06 help:how to rollback postgresql to several minutes ago 刘剑 <liujian@raintai.com>
@ 2016-04-14 12:23 ` Michael Paquier <michael.paquier@gmail.com>
  2016-04-14 12:24   ` Re: help:how to rollback postgresql to several minutes ago Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Michael Paquier @ 2016-04-14 12:23 UTC (permalink / raw)
  To: 刘剑 <liujian@raintai.com>; +Cc: pgsql-bugs

On Thu, Apr 14, 2016 at 7:06 PM, 刘剑 <liujian@raintai.com> wrote:
>  I had written an update sql without where condition to my table, then
> updated whole table.
> So how can i rollback this?

You need to roll in a backup I am afraid, and you should always have
some. Postgres has no way to replay back directly WAL records, it can
only forward replay. In such circumstances standby nodes with a delay
when applying WAL are useful.
-- 
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



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

* Re: help:how to rollback postgresql to several minutes ago
  2016-04-14 10:06 help:how to rollback postgresql to several minutes ago 刘剑 <liujian@raintai.com>
  2016-04-14 12:23 ` Re: help:how to rollback postgresql to several minutes ago Michael Paquier <michael.paquier@gmail.com>
@ 2016-04-14 12:24   ` Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2016-04-14 12:24 UTC (permalink / raw)
  To: 刘剑 <liujian@raintai.com>; +Cc: pgsql-bugs

On Thu, Apr 14, 2016 at 9:23 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Thu, Apr 14, 2016 at 7:06 PM, 刘剑 <liujian@raintai.com> wrote:
>>  I had written an update sql without where condition to my table, then
>> updated whole table.
>> So how can i rollback this?
>
> You need to roll in a backup I am afraid, and you should always have
> some. Postgres has no way to replay back directly WAL records, it can
> only forward replay. In such circumstances standby nodes with a delay
> when applying WAL are useful.

By the way, this is not a bug. Such basic questions had better be
asked on pgsql-novice.
-- 
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



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


end of thread, other threads:[~2016-04-14 12:24 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-04-14 10:06 help:how to rollback postgresql to several minutes ago 刘剑 <liujian@raintai.com>
2016-04-14 12:23 ` Michael Paquier <michael.paquier@gmail.com>
2016-04-14 12:24   ` Michael Paquier <michael.paquier@gmail.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