Re: help:how to rollback postgresql to several minutes ago

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: 刘剑 <liujian(at)raintai(dot)com>
Cc: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: help:how to rollback postgresql to several minutes ago
Date: 2016-04-14 12:23:31
Message-ID: CAB7nPqSE0qU3NLeoVB8OdmEpndgFdMYLysr5jQ=JDT1Js9S=0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Apr 14, 2016 at 7:06 PM, 刘剑 <liujian(at)raintai(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2016-04-14 12:24:22 Re: help:how to rollback postgresql to several minutes ago
Previous Message Nick Cleaton 2016-04-14 11:54:13 Re: Repeated requests for feedback in logical standby