Re: Transaction log - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Transaction log
Date
Msg-id 3786.1302109463@sss.pgh.pa.us
Whole thread Raw
In response to Re: Transaction log  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Transaction log  (aaronenabs <aaronenabs@btconnect.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Apr 6, 2011 at 11:13 AM, aaronenabs <aaronenabs@btconnect.com> wrote:
>> Thanks for that information would look into the xmin and xmax columns.
>> 
>> so its not possible to turn the HeapTupleVisiblity to true to view dead
>> tuples by setting it to
>> 
>> #define HeapTupleSatisfiesVisibility(tuple, snapshot, buffer)(1)

> Well, if you change the source code you can certainly do it... though
> I'm not sure that's exactly the right incantation.

You could do that, but you'd immediately find that the entire system
comes crashing down around your ears: most of the time you *do not want*
to see dead tuples, especially not in system catalogs.  Even simple
matters like creating a table with an index will fail, if both the
original and updated versions of its pg_class tuple are visible.

The hard part of doing something like this is arranging to make visible
only the tuples you want to see, and only when you want to see them.
Maybe you could have a GUC switch that specifies a particular
(non-system) table in which to show dead tuples.

The other hard part is preventing stuff like autovacuum and page
compaction from destroying dead tuples that you still want to see.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: getting to beta
Next
From: Tom Lane
Date:
Subject: Re: getting to beta