Re: [HACKERS] VACUUM ANALYZE problem on linux - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] VACUUM ANALYZE problem on linux
Date
Msg-id 199903151534.KAA13928@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] VACUUM ANALYZE problem on linux  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] VACUUM ANALYZE problem on linux
List pgsql-hackers
> Oleg Broytmann <phd@sun.med.ru> writes:
> >    To remind of the problem - I have a problem running VACUUM ANALYZE on a
> > glibc2 linux (Debian 2.0). On solaris it is Ok (and I got a report it is Ok
> > on HP-UX).
> >    Here is the traceback. The problem is in strcoll, don't understand why.
> 
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x40119587 in strcoll ()
> > (gdb) where
> > #0  0x40119587 in strcoll ()
> > #1  0x816cadd in varstr_cmp (arg1=0x4020fccc "      ", len1=0, 
> >     arg2=0x8268604 "      ", len2=0) at varlena.c:511
> > #2  0x816b31d in bpcharlt (arg1=0x4020fcc8 "\n", arg2=0x8268600 "\n")
> >     at varchar.c:504
> 
> Sure looks like strcoll is broken on your platform.  Build a little test
> program and see if strcoll("", "") coredumps ... if the traceback is
> accurate, that's what was getting passed to it.
> 
> BTW, why in the world is varstr_cmp written to duplicate the strings
> it's passed, rather than just handing them off to strcoll() as-is?

It appears he is unsure whether the string is null-terminated, and he is
right in not assuming that.  We have strncmp, but there is no strncoll().

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Postgres Speed or lack thereof
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] VACUUM ANALYZE problem on linux