pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedExtract transaction from WAL
4+ messages / 4 participants
[nested] [flat]
* Extract transaction from WAL
@ 2019-11-21 08:11 Jill Jade <jill779ks@gmail.com>
2019-11-21 14:23 ` Re: Extract transaction from WAL Michael Loftis <mloftis@wgops.com>
2019-11-21 14:42 ` Re: Extract transaction from WAL Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 2 replies; 4+ messages in thread
From: Jill Jade @ 2019-11-21 08:11 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hello everyone,
I am new to Postgres and I have a query.
I have updated a table which I should not have.
Is there a way to extract the transactions from the WAL and get back the
previous data?
Is there a tool that can help to get back the transactions?
Thanks in advance.
Regards,
Jill
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Extract transaction from WAL
2019-11-21 08:11 Extract transaction from WAL Jill Jade <jill779ks@gmail.com>
@ 2019-11-21 14:23 ` Michael Loftis <mloftis@wgops.com>
2019-11-21 16:14 ` Re: Extract transaction from WAL Marc Millas <marc.millas@mokadb.com>
1 sibling, 1 reply; 4+ messages in thread
From: Michael Loftis @ 2019-11-21 14:23 UTC (permalink / raw)
To: Jill Jade <jill779ks@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
On Thu, Nov 21, 2019 at 04:56 Jill Jade <jill779ks@gmail.com> wrote:
> Hello everyone,
>
> I am new to Postgres and I have a query.
>
> I have updated a table which I should not have.
>
> Is there a way to extract the transactions from the WAL and get back the
> previous data?
>
> Is there a tool that can help to get back the transactions?
>
The normal way is to use a backup along with point in time recovery. But
this requires you’ve setup backups and are archiving WALs F/ex with
pgbackrest. You restore the last full backup from before the incident and
play back to a time stamp or transaction ID. Either to the original server
or elsewhere...in this case I would probably restore elsewhere and extract
the data I needed using tools like pg_dump to restore the selected data.
I’m personally unaware of other methods which may exist.
>
> Thanks in advance.
>
> Regards,
> Jill
>
>
> --
"Genius might be described as a supreme capacity for getting its possessors
into trouble of all kinds."
-- Samuel Butler
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Extract transaction from WAL
2019-11-21 08:11 Extract transaction from WAL Jill Jade <jill779ks@gmail.com>
2019-11-21 14:23 ` Re: Extract transaction from WAL Michael Loftis <mloftis@wgops.com>
@ 2019-11-21 16:14 ` Marc Millas <marc.millas@mokadb.com>
0 siblings, 0 replies; 4+ messages in thread
From: Marc Millas @ 2019-11-21 16:14 UTC (permalink / raw)
To: Michael Loftis <mloftis@wgops.com>; +Cc: Jill Jade <jill779ks@gmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi,
funny enough, this pb looks similar to mine.
the point is: how to guess: what is the "data I need" ??
Looks like we are looking for a way to ask postgres: which transactions
have occurred between this and that.
Obviously, if we can have, online, both the db after the PITR and the db
"corrupted" we can try to create a dblink from one to the other and, then
try to extract the "differences".
but this is not always possible. hence the question about wals.
or ?
regards,
Marc MILLAS
Senior Architect
+33607850334
www.mokadb.com
On Thu, Nov 21, 2019 at 3:24 PM Michael Loftis <mloftis@wgops.com> wrote:
>
>
> On Thu, Nov 21, 2019 at 04:56 Jill Jade <jill779ks@gmail.com> wrote:
>
>> Hello everyone,
>>
>> I am new to Postgres and I have a query.
>>
>> I have updated a table which I should not have.
>>
>> Is there a way to extract the transactions from the WAL and get back the
>> previous data?
>>
>> Is there a tool that can help to get back the transactions?
>>
>
> The normal way is to use a backup along with point in time recovery. But
> this requires you’ve setup backups and are archiving WALs F/ex with
> pgbackrest. You restore the last full backup from before the incident and
> play back to a time stamp or transaction ID. Either to the original server
> or elsewhere...in this case I would probably restore elsewhere and extract
> the data I needed using tools like pg_dump to restore the selected data.
>
> I’m personally unaware of other methods which may exist.
>
>>
>> Thanks in advance.
>>
>> Regards,
>> Jill
>>
>>
>> --
>
> "Genius might be described as a supreme capacity for getting its possessors
> into trouble of all kinds."
> -- Samuel Butler
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Extract transaction from WAL
2019-11-21 08:11 Extract transaction from WAL Jill Jade <jill779ks@gmail.com>
@ 2019-11-21 14:42 ` Laurenz Albe <laurenz.albe@cybertec.at>
1 sibling, 0 replies; 4+ messages in thread
From: Laurenz Albe @ 2019-11-21 14:42 UTC (permalink / raw)
To: Jill Jade <jill779ks@gmail.com>; pgsql-general@lists.postgresql.org
On Thu, 2019-11-21 at 12:11 +0400, Jill Jade wrote:
> I am new to Postgres and I have a query.
>
> I have updated a table which I should not have.
>
> Is there a way to extract the transactions from the WAL and get back the previous data?
>
> Is there a tool that can help to get back the transactions?
This information is not contained in the WAL.
You'll have to restore a backup.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2019-11-21 16:14 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-21 08:11 Extract transaction from WAL Jill Jade <jill779ks@gmail.com>
2019-11-21 14:23 ` Michael Loftis <mloftis@wgops.com>
2019-11-21 16:14 ` Marc Millas <marc.millas@mokadb.com>
2019-11-21 14:42 ` Laurenz Albe <laurenz.albe@cybertec.at>
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