On Mon, 2007-03-05 at 14:31 -0500, Tom Lane wrote:
> "Simon Riggs" <[EMAIL PROTECTED]> writes:
> > WIP patch for diagnostic/test functions for heap pages. (Linked to
> > discussion thread on -hackers "HOT - Whats Next?")
> --- no security checks; surely these must be superuser-only.

OK thanks

> --- relation_open will succeed on things that don't have storage;
> better use heap_open (and check it's not a view).

and again

> --- most of the validation functions are quite pointless as bufmgr will
> refuse to load a page with bad header data.

and again

> > Specifically designed to allow test cases to be written that prove that
> > HOT works,
> Exactly what will these allow that you can't do with inspection of ctid
> etc?  (I suspect your answer will be "can't see infomask", but I'd
> rather expose that as a new system column than invent functions like
> these.)  

Interesting idea, but aren't they keywords? How many system columns
would we need to represent each of the info flags?

The other thing was the ability to see headers of dead tuples as well so
as to understand what is on the page in total, not just the visible
portion of it. With HOT, recently dead tuples can still play an
important part of the data access path, so being able to see them might
explain many things. Is there a way to run a query in SnapshotAll?

I'll happily code it as functions or system cols or any other way, as
long as we can see everything there is to see.

> I'm pretty dubious of the premise anyway --- to get results
> sufficiently constant that the current regression test comparison
> mechanism works for them, I think you'll have to constrain the test
> conditions so much that the test will prove little or nothing.

Well, I agree these would be more basic tests. But people might still
break them. Thinking was really to provide a tutorial to how things

Some more complex multi-session tests have already been written, based
upon analysis of all of the paths taken through HeapTupleSatisfiesX.
Those require the multi-session psql patch to be enabled.

  Simon Riggs             
  EnterpriseDB   http://www.enterprisedb.com

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at


Reply via email to