Re: Heap page diagnostic/test functions (WIP) - Mailing list pgsql-patches

From Simon Riggs
Subject Re: Heap page diagnostic/test functions (WIP)
Date
Msg-id 1173124345.3760.2030.camel@silverbirch.site
Whole thread Raw
In response to Re: Heap page diagnostic/test functions (WIP)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Heap page diagnostic/test functions (WIP)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Heap page diagnostic/test functions (WIP)  ("Pavan Deolasee" <pavan@enterprisedb.com>)
List pgsql-patches
On Mon, 2007-03-05 at 14:31 -0500, Tom Lane wrote:
> "Simon Riggs" <simon@2ndquadrant.com> 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
work.

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



pgsql-patches by date:

Previous
From: "Florian G. Pflug"
Date:
Subject: Re: [HACKERS] Aggressive freezing in lazy-vacuum
Next
From: Tom Lane
Date:
Subject: Re: Heap page diagnostic/test functions (WIP)