pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Marc Millas <marc.millas@mokadb.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Extract transactions from wals ??
Date: Thu, 21 Nov 2019 15:54:16 +0100
Message-ID: <355aa1f83ee7bf0b2f5296f46cf231fb1384b409.camel@cybertec.at> (raw)
In-Reply-To: <CADX_1abgdEKNaMJxSykE6QJGs0HwrK1YU2ZSzZQv-CngiU_6bQ@mail.gmail.com>
References: <CADX_1abgdEKNaMJxSykE6QJGs0HwrK1YU2ZSzZQv-CngiU_6bQ@mail.gmail.com>

On Thu, 2019-11-21 at 14:50 +0100, Marc Millas wrote:
> due to a set of bugs and wrong manip, an inappropriate update have been done into a production DB.
> After that, quite a long set of valuables inserts and updates have been done and needs to be kept.
> Obviously getting a backup and applying pitr will get us just before the offending update.
> Now, we need to find a way of extracting, either from the ex prod db, or from the wals, the "good" transactions to be able to re-apply them.
> 
> This did already happen on a Prod  Oracle DB, and recovering was possible with a :
> select * from table_name AS OF TIMESTAMP TO_TIMESTAMP('09052019 0900','MMDDYYYY HH24MI');
> to get most things done after the problem.
> As we are currently moving out of Oracle, we must prove to the business people that our new postgres env is fine.
> So, ... any idea ?

Sure.

Restore a backup and perform point-in-time-recovery.
Then extract the data you need.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (9+ messages)  latest in thread

Message-ID: <355aa1f83ee7bf0b2f5296f46cf231fb1384b409.camel@cybertec.at>
Permalink:  ../355aa1f83ee7bf0b2f5296f46cf231fb1384b409.camel@cybertec.at/
Also on:    postgresql.org/message-id/355aa1f83ee7bf0b2f5296f46cf231fb1384b409.camel@cybertec.at

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, marc.millas@mokadb.com
  Subject: Re: Extract transactions from wals ??
  In-Reply-To: <355aa1f83ee7bf0b2f5296f46cf231fb1384b409.camel@cybertec.at>
  References: <CADX_1abgdEKNaMJxSykE6QJGs0HwrK1YU2ZSzZQv-CngiU_6bQ@mail.gmail.com> <355aa1f83ee7bf0b2f5296f46cf231fb1384b409.camel@cybertec.at>

* 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