Re: Transaction log

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: aaronenabs <aaronenabs(at)btconnect(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Transaction log
Date: 2011-04-06 17:04:23
Message-ID: 3786.1302109463@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Wed, Apr 6, 2011 at 11:13 AM, aaronenabs <aaronenabs(at)btconnect(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-04-06 17:08:52 Re: getting to beta
Previous Message Thom Brown 2011-04-06 17:01:11 Re: getting to beta