Thread: pg_xlog

pg_xlog

From
Reynard Hilman
Date:
Hi,

Is there a way to translate information in pg_xlog files to a more
readable format?
Basically we have someone accidentally emptied a text column containing
quite a large amount of text, and unfortunately have no backups. I know
the pg_xlog is for WAL, and probably is not the proper way to restore a
lost data. but I find some of the text in one of the files in pg_xlog
directory. I can get the text part but there are also non text
characters. So just wondering if there is a way to interpret the non
text characters.

thanks,
- reynard




Re: pg_xlog

From
Bruce Momjian
Date:
Reynard Hilman wrote:
>
> Hi,
>
> Is there a way to translate information in pg_xlog files to a more
> readable format?
> Basically we have someone accidentally emptied a text column containing
> quite a large amount of text, and unfortunately have no backups. I know
> the pg_xlog is for WAL, and probably is not the proper way to restore a
> lost data. but I find some of the text in one of the files in pg_xlog
> directory. I can get the text part but there are also non text
> characters. So just wondering if there is a way to interpret the non
> text characters.

No way to dump them.  If you haven't vacuumed the data is still there
but just not visible because the transaction id that delete them is
marked as commited.  If you can undo that or hack the code so delete
rows are visible you would see them.  Such skills are quite complex,
however.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: pg_xlog

From
Tom Lane
Date:
Reynard Hilman <reynardmh@lightsky.com> writes:
> Is there a way to translate information in pg_xlog files to a more
> readable format?
> Basically we have someone accidentally emptied a text column containing
> quite a large amount of text, and unfortunately have no backups.

No, and I don't think it would help you anyway.  pg_xlog is only
intended as short-term backup; it's unlikely to contain data that is more
than a few minutes old.

            regards, tom lane