From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Undo Update
Date: Thu, 10 Aug 2023 10:08:51 -0500
Message-ID: <a8a65ba3-de54-d937-488d-07ccddba6eb0@gmail.com> (raw)
In-Reply-To: <CAJk5Ata1HFUcku3RsiFtYxwxM4XwMgxz3Zg=niYOqq27T93vkQ@mail.gmail.com>
References: <CAJk5AtahecUT1LqJdKkG8cYM814x=JTWU0-TQ+6Xn0F9BgetkA@mail.gmail.com>
<89095BFA-4C53-4E34-AB59-F58551B8F909@jakobs.com>
<CAJk5Ata1HFUcku3RsiFtYxwxM4XwMgxz3Zg=niYOqq27T93vkQ@mail.gmail.com>
Ask your database administrator about PITR (Point In Time Recovery).
On 8/10/23 04:17, Rajesh Kumar wrote:
> In that case, how to take a backup specifically before that update and are
> there any prequisites such as stopping the server when it happens? And
> then backup like that?
>
> On Thu, 10 Aug, 2023, 2:36 PM Holger Jakobs, <holger@jakobs.com> wrote:
>
> I'm afraid you will have to execute the SQL statement undoing it. Of
> you don't know the previous values, you're out of luck.
>
> Then a backup is your best friend.
>
>
> Am 10. August 2023 11:02:26 MESZ schrieb Rajesh Kumar
> <rajeshkumar.dba09@gmail.com>:
>
> Hi friends
>
> I was given a query to update the record in table A with where
> clause. But I executed it in production mistakenly without where
> clause so it updated incorrectly for all rows.
>
> How do I resolve this?
>
--
Born in Arizona, moved to Babylonia.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Undo Update
In-Reply-To: <a8a65ba3-de54-d937-488d-07ccddba6eb0@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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