Re: [HACKERS] VACUUM ANALYZE problem on linux
Bruce Momjian <maillist@candle.pha.pa.us>
From: Bruce Momjian <maillist@candle.pha.pa.us>
To: tgl@sss.pgh.pa.us (Tom Lane)
Cc: phd2@earthling.net, pgsql-hackers@postgreSQL.org
Date: 1999-03-15T15:34:13Z
Lists: 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, Pennsylvania 19026