Thread

  1. Re: [HACKERS] ordering RH6.1

    Tom Lane <tgl@sss.pgh.pa.us> — 1999-12-17T02:04:25Z

    Lamar Owen <lamar.owen@wgcr.org> writes:
    > For RH 6.0: [ correct results ]
    
    > for RH 6.1 (fresh install):
    > column1
    > -------
    >       1
    >     100
    >      11
    >       2
    
    > So, I moved the physical database structure over from the 6.1 machine to
    > the 6.0 machine and redid the select: the right results.
    
    > The RedHat 6.0 machine is running the same exact postgres binaries that
    > the RedHat 6.1 machine is running -- the 6.5.3-2nl rpms were built on my
    > home RedHat 6.1 machine.
    
    Wow.  Same data files, same binaries, different results.  Sure looks
    like the finger is pointing at 6.1's libc.  (I'm assuming that the
    binaries make use of a shared-library libc, not statically-linked-in
    routines, right?)
    
    > Ok, hackers:
    > What library routine is used to do the order by in this case?
    
    If you compiled with USE_LOCALE, it's strcoll(); if not, strncmp().
    See varstr_cmp() in src/backend/utils/adt/varlena.c.
    
    > Looking at the regression diffs, it is obvious that there is a collation
    > problem here.  But where is this collation sequence problem coming from?
    > (Note that the 6.5.3-2nl RPMs are built without locale support.)
    
    OK...
    
    Your regression failures show collation problems in all three of bpchar,
    varchar, and name.  (But curiously, not for text ... hmm ...).  bpchar
    and varchar both use varstr_cmp(), but namelt just calls strncmp
    unconditionally --- see adt/name.c.  So the evidence is looking very
    strong that strncmp has got some kind of problem on RH 6.1.
    
    			regards, tom lane
    
    
  2. Re: [HACKERS] ordering RH6.1

    Lamar Owen <lamar.owen@wgcr.org> — 1999-12-17T02:56:22Z

    On Thu, 16 Dec 1999, Tom Lane wrote:
    > Lamar Owen <lamar.owen@wgcr.org> writes:
    > Wow.  Same data files, same binaries, different results.  Sure looks
    > like the finger is pointing at 6.1's libc.  (I'm assuming that the
    > binaries make use of a shared-library libc, not statically-linked-in
    > routines, right?)
    
    Right.
    
    > Your regression failures show collation problems in all three of bpchar,
    > varchar, and name.  (But curiously, not for text ... hmm ...).  bpchar
    > and varchar both use varstr_cmp(), but namelt just calls strncmp
    > unconditionally --- see adt/name.c.  So the evidence is looking very
    > strong that strncmp has got some kind of problem on RH 6.1.
    
    More information: the LOCALE enabled-binaries act the same way.  So, there's an
    issue with both strcoll and strncmp.  What gets me is that it works perfectly
    fine on my RedHat 6.1 box that was upgraded from RedHat 6.0 -- but it does not
    work fine at all on a box that I did a fresh install on today -- from the same
    CD I did the upgrade.
    
    Hmmm....
    
    --
    Lamar Owen
    WGCR Internet Radio
    1 Peter 4:11
    
    > 
    > 			regards, tom lane
    
    
  3. Re: [HACKERS] ordering RH6.1

    Cristian Gafton <gafton@redhat.com> — 1999-12-17T03:52:23Z

    On Thu, 16 Dec 1999, Lamar Owen wrote:
    
    > More information: the LOCALE enabled-binaries act the same way.  So, there's an
    > issue with both strcoll and strncmp.  What gets me is that it works perfectly
    > fine on my RedHat 6.1 box that was upgraded from RedHat 6.0 -- but it does not
    > work fine at all on a box that I did a fresh install on today -- from the same
    > CD I did the upgrade.
    
    Any differences in the environment variables maybe?
    
    Cristian
    --
    ----------------------------------------------------------------------
    Cristian Gafton    --     gafton@redhat.com     --       Red Hat, Inc.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     UNIX is user friendly. It's just selective about who its friends are.
    
    
    
    
    
  4. Re: [HACKERS] ordering RH6.1

    Lamar Owen <lamar.owen@wgcr.org> — 1999-12-17T03:58:21Z

    On Thu, 16 Dec 1999, Cristian Gafton wrote:
    > On Thu, 16 Dec 1999, Lamar Owen wrote:
    > 
    > > More information: the LOCALE enabled-binaries act the same way.  So, there's an
    > > issue with both strcoll and strncmp.  What gets me is that it works perfectly
    > > fine on my RedHat 6.1 box that was upgraded from RedHat 6.0 -- but it does not
    > > work fine at all on a box that I did a fresh install on today -- from the same
    > > CD I did the upgrade.
    > 
    > Any differences in the environment variables maybe?
    
    In a nutshell, yes.  /etc/sysconfig/i18n on the fresh install sets LANG,
    LC_ALL, and LINGUAS all to be "en_US".  The upgraded machine at home doesn't
    have an /etc/sysconfig/i18n -- nor does the RH 6.0 box.
    
    --
    Lamar Owen
    WGCR Internet Radio
    1 Peter 4:11