Re: [HACKERS] Documentation of bt_page_items()'s ctid field

2015-03-12 Thread Tom Lane
Jeff Janes writes: > I think we do want this. It was asked how much we want to include > internals of the btree code into pageinspect documentation, but I think the > nature of pageinspect makes that unavoidable. Yeah. Committed with a little bit of additional wordsmithing.

Re: [HACKERS] Documentation of bt_page_items()'s ctid field

2015-03-11 Thread Peter Geoghegan
On Wed, Mar 11, 2015 at 3:14 PM, Jeff Janes wrote: > I'd mark it ready for committer, but since I also attached a suggested > replacement patch it seems presumptuous to do that. I've marked it "ready for committer". I think your version is slightly better. Thanks -- Peter Geoghegan -- Sent

Re: [HACKERS] Documentation of bt_page_items()'s ctid field

2015-03-11 Thread Jeff Janes
On Mon, Mar 9, 2015 at 5:34 PM, Peter Geoghegan wrote: > On Mon, Mar 9, 2015 at 5:18 PM, Jeff Janes wrote: > >> It has a right-link (that's the easiest way to tell). > > > > > > Meaning that btpo_next is not zero? Should we say that in the patch in > so > > many words? I think it will be hard

Re: [HACKERS] Documentation of bt_page_items()'s ctid field

2015-03-09 Thread Peter Geoghegan
On Mon, Mar 9, 2015 at 5:18 PM, Jeff Janes wrote: >> It has a right-link (that's the easiest way to tell). > > > Meaning that btpo_next is not zero? Should we say that in the patch in so > many words? I think it will be hard to explain the page_items more without > also explaining the page_stats

Re: [HACKERS] Documentation of bt_page_items()'s ctid field

2015-03-09 Thread Jeff Janes
On Mon, Mar 9, 2015 at 4:06 PM, Peter Geoghegan wrote: > On Mon, Mar 9, 2015 at 3:51 PM, Jeff Janes wrote: > > How do I know if I am looking at a non-rightmost page? > > It has a right-link (that's the easiest way to tell). Meaning that btpo_next is not zero? Should we say that in the patch i

Re: [HACKERS] Documentation of bt_page_items()'s ctid field

2015-03-09 Thread Peter Geoghegan
On Mon, Mar 9, 2015 at 3:51 PM, Jeff Janes wrote: > How do I know if I am looking at a non-rightmost page? It has a right-link (that's the easiest way to tell). It will (as the docpatch points out) also necessarily have a ""high key" item. We know that we have to move right if the high key doesn

Re: [HACKERS] Documentation of bt_page_items()'s ctid field

2015-03-09 Thread Jeff Janes
On Tue, Dec 30, 2014 at 8:59 AM, Heikki Linnakangas wrote: > On 12/30/2014 04:08 AM, Peter Geoghegan wrote: > >> Attached documentation patch describes the purpose of >> bt_page_items()'s ctid field. This has come up enough times in >> disaster recovery or testing scenarios that I feel it's worth

Re: [HACKERS] Documentation of bt_page_items()'s ctid field

2014-12-30 Thread Peter Geoghegan
On Tue, Dec 30, 2014 at 12:21 PM, Heikki Linnakangas wrote: > In practice, we never store any actual key value for the "minus infinity" > key. I guess the code would ignore it if it was there, but it would make > more sense to explain that the first data key on an internal page does not > have a k

Re: [HACKERS] Documentation of bt_page_items()'s ctid field

2014-12-30 Thread Heikki Linnakangas
On 12/30/2014 10:07 PM, Peter Geoghegan wrote: On Tue, Dec 30, 2014 at 8:59 AM, Heikki Linnakangas wrote: How much detail on the b-tree internals do we want to put in the pageinspect documentation? I can see that being useful, but should we also explain e.g. that the first item on each (non-rig

Re: [HACKERS] Documentation of bt_page_items()'s ctid field

2014-12-30 Thread Peter Geoghegan
On Tue, Dec 30, 2014 at 8:59 AM, Heikki Linnakangas wrote: > How much detail on the b-tree internals do we want to put in the pageinspect > documentation? I can see that being useful, but should we also explain e.g. > that the first item on each (non-rightmost) page is the high key? Maybe we shou

Re: [HACKERS] Documentation of bt_page_items()'s ctid field

2014-12-30 Thread Heikki Linnakangas
On 12/30/2014 04:08 AM, Peter Geoghegan wrote: Attached documentation patch describes the purpose of bt_page_items()'s ctid field. This has come up enough times in disaster recovery or testing scenarios that I feel it's worth drawing particular attention to. How much detail on the b-tree intern

[HACKERS] Documentation of bt_page_items()'s ctid field

2014-12-29 Thread Peter Geoghegan
Attached documentation patch describes the purpose of bt_page_items()'s ctid field. This has come up enough times in disaster recovery or testing scenarios that I feel it's worth drawing particular attention to. -- Peter Geoghegan diff --git a/doc/src/sgml/pageinspect.sgml b/doc/src/sgml/pageinsp