Thread

  1. binding table

    Bruce Momjian <maillist@candle.pha.pa.us> — 1998-06-27T15:48:42Z

    I have renamed the BindingTable to ShmemIndex.  Binding table made no
    sense to me, and the table is an index of shared memory structures, so
    the new name should be clearer.
    
    -- 
    Bruce Momjian                          |  830 Blythe Avenue
    maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
      +  If your life is a hard drive,     |  (610) 353-9879(w)
      +  Christ can be your backup.        |  (610) 853-3000(h)
    
    
  2. Re: [HACKERS] binding table

    David Gould <dg@illustra.com> — 1998-06-27T23:05:11Z

    > 
    > I have renamed the BindingTable to ShmemIndex.  Binding table made no
    > sense to me, and the table is an index of shared memory structures, so
    > the new name should be clearer.
    > 
    > -- 
    > Bruce Momjian                          |  830 Blythe Avenue
    > maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
    >   +  If your life is a hard drive,     |  (610) 353-9879(w)
    >   +  Christ can be your backup.        |  (610) 853-3000(h)
    > 
    
    
    I kinda wish you hadn't. These kinds of style changes impose a certain cost
    in terms of merge issues and add a (perhaps small) bit of risk of introducing
    bugs without any improvement in the product that can be detected by the
    user.
    
    Btw, the name "BindingTable" is derived from the lisp terminology where
    a variable is composed of a storage location and a "binding" of a symbol to
    refer to that location. As much of postgres was initially written in lisp,
    this is a fairly natural name.
    
    As it happens, the shared memory structure (formerly) known as BindingTable
    really is used in a way that closely resembles lisp style bindings. When
    you want to create something in shared memory (eg the lock table), you
    allocate a name in the binding table and then hang all the datastructures
    onto the name.
    
    Finally, I think the name ShmemIndex lends itself to confusion with table
    indexes etc...
    
    -dg
    
    David Gould            dg@illustra.com           510.628.3783 or 510.305.9468 
    Informix Software  (No, really)         300 Lakeside Drive  Oakland, CA 94612
    "Don't worry about people stealing your ideas.  If your ideas are any
     good, you'll have to ram them down people's throats." -- Howard Aiken
    
    
  3. Re: [HACKERS] binding table

    Bruce Momjian <maillist@candle.pha.pa.us> — 1998-06-28T01:58:29Z

    > I kinda wish you hadn't. These kinds of style changes impose a certain cost
    > in terms of merge issues and add a (perhaps small) bit of risk of introducing
    > bugs without any improvement in the product that can be detected by the
    > user.
    
    I normally would not start changing things like this, and take a 'if it
    ain't broke, don't fix it' metality, but the original code was so
    riddled with problems and needed changes, I got used to making massive
    changes.  pgindent is a great example.  Very risky initially, it was
    absolutely necessary to make things easier for new people looking at the
    code.  Now that I have become experienced making such changes, I have
    not hesitated to make them.  If someone is working in a certain area, I
    tend to stay away, though.
    
    I have developed a certain confidence in making these changes, partially
    because mkid allows such easy identification of the problem areas.  (See
    developers FAQ for mkid.)  For example, the /parser directory was a
    terrible mess.  I had worked on it, and still could not keep the stuff
    straight.  I redesigned the entire file layout, grouping functions into
    smaller files.  It was risky, and a massive diff, but I am certain it
    has allowed Thomas and others to more clearly understand and change the
    existing code.
    
    Basically, I would like to continue cleaning up the code where I see
    areas of improvement, as long as it does not introduce problems for
    other developers.
    
    > Btw, the name "BindingTable" is derived from the lisp terminology where
    > a variable is composed of a storage location and a "binding" of a symbol to
    > refer to that location. As much of postgres was initially written in lisp,
    > this is a fairly natural name.
    > 
    > As it happens, the shared memory structure (formerly) known as BindingTable
    > really is used in a way that closely resembles lisp style bindings. When
    > you want to create something in shared memory (eg the lock table), you
    > allocate a name in the binding table and then hang all the datastructures
    > onto the name.
    
    The confusion I had is that Binding is really what a hash structure
    does, allowing you to supply a value, and get a matching value.  So a
    BindingTable seemed like a normal hash structure, not a real shared
    memory index.
    
    I don't know lisp, so I did not know it actually had a meaning. 
    Unfortunately, very few other developers know lisp, so the name had
    little meaning for them either.
    
    > 
    > Finally, I think the name ShmemIndex lends itself to confusion with table
    > indexes etc...
    
    I can change the name again.  What should it be?  (Please don't say
    "BindingTable"). :-)
    
    
    -- 
    Bruce Momjian                          |  830 Blythe Avenue
    maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
      +  If your life is a hard drive,     |  (610) 353-9879(w)
      +  Christ can be your backup.        |  (610) 853-3000(h)