Re: Using xmax to detect deleted rows - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Using xmax to detect deleted rows
Date
Msg-id 20160108150209.GA583343@alvherre.pgsql
Whole thread Raw
In response to Using xmax to detect deleted rows  (Meel Velliste <meel.velliste@gmail.com>)
Responses Re: Using xmax to detect deleted rows  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-general
Meel Velliste wrote:
> I would like to use the "xmax" column to detect rows that have been
> recently deleted. Is it possible to get the deleted row versions with
> non-zero xmax to remain visible long enough that I could periodically
> check, say once an hour, and still be able to see rows that were deleted
> since I last checked?

No.  Maybe you want a trigger that saves the deleted row somewhere (a
separate table perhaps) which you can later inspect and delete again?

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-general by date:

Previous
From: Meel Velliste
Date:
Subject: Using xmax to detect deleted rows
Next
From: Deven Phillips
Date:
Subject: PostgreSQL 9.5, mysql_fdw, and IMPORT FOREIGN SCHEMA question