Thread: Heap page diagnostic functions

Heap page diagnostic functions

From
Heikki Linnakangas
Date:
I'm taking over Simon's heap page diagnostic functions to get them into 
shape for committing.

I'm thinking of having a new contrib-module for them: pgforensics. All 
the new functions go there, and I'm also going to move bt_page_items, 
bt_page_stats, and bt_metap functions from pgstattuple to the new 
module. They're all low-level functions that no application should be 
calling, so there shouldn't be any compatibility issues in moving them.

That'd leave only the functions that a DBA or tools should be concerned 
with in pgstattuple, and all the low-level debugging aids to the new 
module. Thoughts?

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


Re: Heap page diagnostic functions

From
Bruce Momjian
Date:
Sounds good, though I am worried that "forensics" will not be a word
easily understood by non-native English speakers.

---------------------------------------------------------------------------

Heikki Linnakangas wrote:
> I'm taking over Simon's heap page diagnostic functions to get them into 
> shape for committing.
> 
> I'm thinking of having a new contrib-module for them: pgforensics. All 
> the new functions go there, and I'm also going to move bt_page_items, 
> bt_page_stats, and bt_metap functions from pgstattuple to the new 
> module. They're all low-level functions that no application should be 
> calling, so there shouldn't be any compatibility issues in moving them.
> 
> That'd leave only the functions that a DBA or tools should be concerned 
> with in pgstattuple, and all the low-level debugging aids to the new 
> module. Thoughts?
> 
> -- 
>    Heikki Linnakangas
>    EnterpriseDB   http://www.enterprisedb.com
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
> 
>                http://archives.postgresql.org

--  Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: Heap page diagnostic functions

From
Heikki Linnakangas
Date:
Any suggestions? pgdiagnostics?

I'm happy with forensics myself.

Bruce Momjian wrote:
> Sounds good, though I am worried that "forensics" will not be a word
> easily understood by non-native English speakers.
> 
> ---------------------------------------------------------------------------
> 
> Heikki Linnakangas wrote:
>> I'm taking over Simon's heap page diagnostic functions to get them into 
>> shape for committing.
>>
>> I'm thinking of having a new contrib-module for them: pgforensics. All 
>> the new functions go there, and I'm also going to move bt_page_items, 
>> bt_page_stats, and bt_metap functions from pgstattuple to the new 
>> module. They're all low-level functions that no application should be 
>> calling, so there shouldn't be any compatibility issues in moving them.
>>
>> That'd leave only the functions that a DBA or tools should be concerned 
>> with in pgstattuple, and all the low-level debugging aids to the new 
>> module. Thoughts?
>>
>> -- 
>>    Heikki Linnakangas
>>    EnterpriseDB   http://www.enterprisedb.com
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 4: Have you searched our list archives?
>>
>>                http://archives.postgresql.org
> 


--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


Re: Heap page diagnostic functions

From
Bruce Momjian
Date:
Heikki Linnakangas wrote:
> Any suggestions? pgdiagnostics?

Yes, I like "diagnostics", or "internals".  I just think forensics isn't
going to be understood by the average native English speaker, let alone
non-English speakers.

---------------------------------------------------------------------------


> 
> I'm happy with forensics myself.
> 
> Bruce Momjian wrote:
> > Sounds good, though I am worried that "forensics" will not be a word
> > easily understood by non-native English speakers.
> > 
> > ---------------------------------------------------------------------------
> > 
> > Heikki Linnakangas wrote:
> >> I'm taking over Simon's heap page diagnostic functions to get them into 
> >> shape for committing.
> >>
> >> I'm thinking of having a new contrib-module for them: pgforensics. All 
> >> the new functions go there, and I'm also going to move bt_page_items, 
> >> bt_page_stats, and bt_metap functions from pgstattuple to the new 
> >> module. They're all low-level functions that no application should be 
> >> calling, so there shouldn't be any compatibility issues in moving them.
> >>
> >> That'd leave only the functions that a DBA or tools should be concerned 
> >> with in pgstattuple, and all the low-level debugging aids to the new 
> >> module. Thoughts?
> >>
> >> -- 
> >>    Heikki Linnakangas
> >>    EnterpriseDB   http://www.enterprisedb.com
> >>
> >> ---------------------------(end of broadcast)---------------------------
> >> TIP 4: Have you searched our list archives?
> >>
> >>                http://archives.postgresql.org
> > 
> 
> 
> -- 
>    Heikki Linnakangas
>    EnterpriseDB   http://www.enterprisedb.com
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match

--  Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: Heap page diagnostic functions

From
Tom Lane
Date:
Bruce Momjian <bruce@momjian.us> writes:
> Heikki Linnakangas wrote:
>> Any suggestions? pgdiagnostics?

> Yes, I like "diagnostics", or "internals".  I just think forensics isn't
> going to be understood by the average native English speaker, let alone
> non-English speakers.

"diagnostics" is a two-dollar word also.  It might be a bit more widely
known than "forensics", but it's longer and harder to spell.  Not that
I have any great suggestions to make.  Maybe "pgtestfuncs"?
        regards, tom lane


Re: Heap page diagnostic functions

From
Heikki Linnakangas
Date:
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
>> Heikki Linnakangas wrote:
>>> Any suggestions? pgdiagnostics?
> 
>> Yes, I like "diagnostics", or "internals".  I just think forensics isn't
>> going to be understood by the average native English speaker, let alone
>> non-English speakers.
> 
> "diagnostics" is a two-dollar word also.  It might be a bit more widely
> known than "forensics", but it's longer and harder to spell.  Not that
> I have any great suggestions to make.  Maybe "pgtestfuncs"?

I thought about pgdebugfuncs myself at first. But that's so generic and 
pgtestfuncs even more so. Diagnostics is pretty good, that word is in 
use in other languages as well as a medical term, so it's meaning would 
be clear to a lot of people even if they've never encountered the 
English word before.

Besides, the audience for these functions is quite narrow: people 
working on PostgreSQL internals, so I don't think the language issue 
matters that much.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


Re: Heap page diagnostic functions

From
Zdenek Kotala
Date:
Heikki Linnakangas wrote:
> Tom Lane wrote:
>> Bruce Momjian <bruce@momjian.us> writes:
>>> Heikki Linnakangas wrote:
>>>> Any suggestions? pgdiagnostics?
>>
>>> Yes, I like "diagnostics", or "internals".  I just think forensics isn't
>>> going to be understood by the average native English speaker, let alone
>>> non-English speakers.
>>
>> "diagnostics" is a two-dollar word also.  It might be a bit more widely
>> known than "forensics", but it's longer and harder to spell.  Not that
>> I have any great suggestions to make.  Maybe "pgtestfuncs"?
> 
> I thought about pgdebugfuncs myself at first. But that's so generic and 
> pgtestfuncs even more so. Diagnostics is pretty good, that word is in 
> use in other languages as well as a medical term, so it's meaning would 
> be clear to a lot of people even if they've never encountered the 
> English word before.
> 
> Besides, the audience for these functions is quite narrow: people 
> working on PostgreSQL internals, so I don't think the language issue 
> matters that much.

I did not find "forensics" in translator and It mentions in Oxford 
vocabulary but explanation is not clear for me. I agree with Bruce It is 
not good name. What about short form of diagnostic "diag"?

    Zdenek


Re: Heap page diagnostic functions

From
"Florian G. Pflug"
Date:
Zdenek Kotala wrote:
> I did not find "forensics" in translator and It mentions in Oxford 
> vocabulary but explanation is not clear for me. I agree with Bruce It is 
> not good name. What about short form of diagnostic "diag"?

Doesn't forensics basically mean to find the cause of something
*after* it happened, based on traces that the event left behind?
Like finding the culprit of a crime done using for example
fingerprints he left, or tracing the actions of an intruder
by analyzing logfiles or modified binaries?

In that case, it doesn't accuratly describe those functions anyway
I think, because you call them from inside the database while it's
running, not from the outside after it was stopped or crashed.

Just the 2 eurocents of a non-native speaker...
Greetings, Florian Pflug




Re: Heap page diagnostic functions

From
Tom Lane
Date:
"Florian G. Pflug" <fgp@phlo.org> writes:
> Doesn't forensics basically mean to find the cause of something
> *after* it happened, based on traces that the event left behind?

Hmm ... the Oxford English Dictionary defines "forensic" as "pertaining
to, connected with, or used in courts of law".  There are also some
senses related to argumentation, but nothing specifically about evidence
analysis, whether after-the-fact or not.  So yeah, it doesn't seem like
a good name for these functions anyhow.
        regards, tom lane


Re: Heap page diagnostic functions

From
Heikki Linnakangas
Date:
Zdenek Kotala wrote:
> Heikki Linnakangas wrote:
>> Tom Lane wrote:
>>> Bruce Momjian <bruce@momjian.us> writes:
>>>> Heikki Linnakangas wrote:
>>>>> Any suggestions? pgdiagnostics?
>>>
>>>> Yes, I like "diagnostics", or "internals".  I just think forensics 
>>>> isn't
>>>> going to be understood by the average native English speaker, let alone
>>>> non-English speakers.
>>>
>>> "diagnostics" is a two-dollar word also.  It might be a bit more widely
>>> known than "forensics", but it's longer and harder to spell.  Not that
>>> I have any great suggestions to make.  Maybe "pgtestfuncs"?
>>
>> I thought about pgdebugfuncs myself at first. But that's so generic 
>> and pgtestfuncs even more so. Diagnostics is pretty good, that word is 
>> in use in other languages as well as a medical term, so it's meaning 
>> would be clear to a lot of people even if they've never encountered 
>> the English word before.
>>
>> Besides, the audience for these functions is quite narrow: people 
>> working on PostgreSQL internals, so I don't think the language issue 
>> matters that much.
> 
> I did not find "forensics" in translator and It mentions in Oxford 
> vocabulary but explanation is not clear for me. I agree with Bruce It is 
> not good name. What about short form of diagnostic "diag"?

Webster lists "scientific analysis of physical evidence (as from a crime 
scene)" as one meaning: http://www.webster.com/dictionary/forensics.

I'm going to go with pgdiagnostics. We could short it to just "pgdiag", 
but that feels too short :). We could make it "pgdiagfuncs", but that's 
not much shorter than pgdiagnostics.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


Re: Heap page diagnostic functions

From
"Pavan Deolasee"
Date:


On 5/2/07, Heikki Linnakangas <heikki@enterprisedb.com> wrote:


I'm going to go with pgdiagnostics. We could short it to just "pgdiag",
but that feels too short :). We could make it "pgdiagfuncs", but that's
not much shorter than pgdiagnostics.


Just to add more confusion :-), how about "pginspect" ? 

Thanks,
Pavan

--

EnterpriseDB     http://www.enterprisedb.com

Re: Heap page diagnostic functions

From
"Zeugswetter Andreas ADI SD"
Date:
> > Any suggestions? pgdiagnostics?
>
> Yes, I like "diagnostics", or "internals".  I just think
> forensics isn't going to be understood by the average native
> English speaker, let alone non-English speakers.

I think forensics is ok. The world is currently beeing swamped with
related tv shows :-)

Andreas


Re: Heap page diagnostic functions

From
Bruce Momjian
Date:
Pavan Deolasee wrote:
> On 5/2/07, Heikki Linnakangas <heikki@enterprisedb.com> wrote:
> >
> >
> >
> > I'm going to go with pgdiagnostics. We could short it to just "pgdiag",
> > but that feels too short :). We could make it "pgdiagfuncs", but that's
> > not much shorter than pgdiagnostics.
> 
> 
> 
> Just to add more confusion :-), how about "pginspect" ?

I like it.

--  Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: Heap page diagnostic functions

From
Zdenek Kotala
Date:
Heikki Linnakangas wrote:

> I'm going to go with pgdiagnostics. We could short it to just "pgdiag", 
> but that feels too short :). We could make it "pgdiagfuncs", but that's 
> not much shorter than pgdiagnostics.

pgdiagfn? It is only 8 chars length ;).

Zdenek


Re: Heap page diagnostic functions

From
Gregory Stark
Date:
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> Hmm ... the Oxford English Dictionary defines "forensic" as "pertaining
> to, connected with, or used in courts of law".  There are also some
> senses related to argumentation, but nothing specifically about evidence
> analysis, whether after-the-fact or not.  So yeah, it doesn't seem like
> a good name for these functions anyhow.

"Zeugswetter Andreas ADI SD" <ZeugswetterA@spardat.at> writes:

> I think forensics is ok. The world is currently beeing swamped with
> related tv shows :-)

Indeed, it's the only proprosal so far with connotation of the right level of
detail that the functions about the data. Police forensics laboratories spend
their time picking up fibres and laboriously fingerprinting every surface
which is about what it feels like to dig through every tuple of a heap page.

Incidentally, Tom, were you consulting the dead-tree edition of the OED? In
which case you would have naturally not seen this in 1993 additions:
   ADDITIONS SERIES 1993
       forensic, a. and n.
       Add: [B.] 2. ellipt. use of the adj. A forensic science department,   laboratory, etc. colloq. 1963 Guardian 2
Sept.8/5 When a police officer   hisses in my ear in court, `Are you from forensic?' I no longer protest. I   just
weaklynod my head. 1971 W. J. BURLEY Guilt Edged iv. 74 A breakdown   truck is taking it to Division. Forensic can look
atit in their garage.   1991 J. NEEL Death of Partner vi. 83 `Forensic rang,' Bruce reported   dourly. `The autopsy
reportis on its way.'
 

Though it seems like a poor definition. My English teachers would have chided
me for using the word in its definition...

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com



Re: Heap page diagnostic functions

From
Tom Lane
Date:
Gregory Stark <stark@enterprisedb.com> writes:
> Incidentally, Tom, were you consulting the dead-tree edition of the OED?

I plead guilty to having blown some dust off it before opening it ...
but when looking for an authoritative reference, I like things that
have got heft to them ...
        regards, tom lane