Re: is there a function in postgresql that can be used for retrieving deleted rows

Поиск
Список
Период
Сортировка
От Steve Atkins
Тема Re: is there a function in postgresql that can be used for retrieving deleted rows
Дата
Msg-id D255D6D0-1FFB-4991-96E9-A7F2FD599342@blighty.com
обсуждение исходный текст
Ответ на is there a function in postgresql that can be used for retrieving deleted rows  ("Charles Waweru" <cwaweru@systempartners.biz>)
Список pgsql-general
On Oct 21, 2011, at 10:23 PM, Charles Waweru wrote:

> I am looking for a tool in the PostgreSQL database that can help to audit fraudulent activities on a PostgreSQL
database.Of particular interest is how to retrieve say from a PostgreSQL sales database all the deleted rows. 
>
> Any suggestion please would be appreciated.

For forensics work after the fact the three database-specific places to look are the server logs, the WAL logs and the
rawdata files. The server logs are standard human readable logs which may or may not have anything useful in them.  

Normal forensics rules - if you're not imaging the whole drive then take copies of everything first, then copies of
those,and only work on the copies of copies. 

https://github.com/snaga/xlogdump can show you what's in the WAL logs, but expect to spend some time working out what's
goingon.  

The raw data files may have old rows in them, if they've not been overwritten yet. pg_filedump might help you there,
dependingon the version of postgresql you're running. (Most row updates are done by deleting an old row and creating a
newone, so it doesn't make much traffic to wipe out the old rows if autovacuum is running). 

Don't forget related logs and backups - logs from the front-end webserver, if any, and any backups.

Cheers,
  Steve


В списке pgsql-general по дате отправления:

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: is there a function in postgresql that can be used for retrieving deleted rows
Следующее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: Are file system level differential/incremental backups possible?