Re: pg_controldata gobbledygook - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: pg_controldata gobbledygook
Date
Msg-id CAMkU=1z2KaBiWws6MEadnhv62V7+xteFkRNJm0MPmNuJwPMnXA@mail.gmail.com
Whole thread Raw
In response to Re: pg_controldata gobbledygook  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Fri, Apr 26, 2013 at 2:08 AM, Andres Freund <andres@2ndquadrant.com> wrote:
On 2013-04-25 23:07:02 -0400, Peter Eisentraut wrote:
> I'm not sure who is supposed to be able to read this sort of stuff:
>
> Latest checkpoint's NextXID:          0/7575
> Latest checkpoint's NextOID:          49152
> Latest checkpoint's NextMultiXactId:  7
> Latest checkpoint's NextMultiOffset:  13
> Latest checkpoint's oldestXID:        1265
> Latest checkpoint's oldestXID's DB:   1
> Latest checkpoint's oldestActiveXID:  0
> Latest checkpoint's oldestMultiXid:   1
> Latest checkpoint's oldestMulti's DB: 1
>
> Note that these symbols don't even correspond to the actual symbols used
> in the source code in some cases.
>
> The comments in the pg_control.h header file use much more pleasant
> terms, which when put to use would lead to output similar to this:
>
> Latest checkpoint's next free transaction ID:             0/7575
> Latest checkpoint's next free OID:                        49152
> Latest checkpoint's next free MultiXactId:                7
> Latest checkpoint's next free MultiXact offset:           13
> Latest checkpoint's cluster-wide minimum datfrozenxid:    1265
> Latest checkpoint's database with cluster-wide minimum datfrozenxid:  1
> Latest checkpoint's oldest transaction ID still running:  0
> Latest checkpoint's cluster-wide minimum datminmxid:      1
> Latest checkpoint's database with cluster-wide minimum datminmxid:  1
>
> One could even rearrange the layout a little bit like this:
>
> Control data as of latest checkpoint:
>     next free transaction ID:             0/7575
>     next free OID:                        49152

I have to admit I don't see the point. None of those values is particularly
interesting to anybody without implementation level knowledge and those
will likely deal with them just fine. And I find the version with the
shorter names far quicker to read.

I agree.  For the ones I didn't know the meaning of, I still don't know the meaning of them based on the long form, either.  While a tutorial on what these things mean might be useful, embedding the tutorial into the output of pg_controldata probably isn't the right place.
 
Cheers,

Jeff

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Recovery target 'immediate'
Next
From: Tom Lane
Date:
Subject: Re: Functional dependencies and GROUP BY - for subqueries