Re: Second call for platform testing - Mailing list pgsql-hackers

From Mark Knox
Subject Re: Second call for platform testing
Date
Msg-id 20011203165858.A20858@hardline.org
Whole thread Raw
In response to Re: Second call for platform testing  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Dec 03, 2001 at 02:01:30PM -0500, Tom Lane wrote:
> That error is coming from the following ugly coding:
> 
>     *dbhash = hash_create("Databases hash", PGSTAT_DB_HASH_SIZE, &hash_ctl,
>                           HASH_ELEM | HASH_FUNCTION | mcxt_flags);
>     if (pgStatDBHash == NULL)
>     /* raise error */

Interesting...

> AFAICT dbhash always points at the static variable pgStatDBHash, so the
> code is not quite incorrect, though it's certainly trouble waiting to
> happen as soon as someone changes things so that dbhash might point
> elsewhere.  What I'm wondering is if your compiler is missing the

Possibly.. it's not the most recent by any means, but it generally behaves
well. Unfortunately, nobody is maintaining the arm gcc toolchain anymore (as
far as I know).

> before the store through dbhash occurs.  Does it help if you change
> the second line (line 2094 in src/backend/postmaster/pgstat.c) to:
> 
>     if (*dbhash == NULL)
> 
> I'm going to commit this change in CVS anyway, but I'm wondering if it
> explains your problem or not.

I'll give it a shot later tonight and let you know. Thanks for having a
look.

--   __ .--------.  |==||        |            -(  Mark 'segfault' Knox  )- |==||________| |::| __====__`. .'`.  "Unix
*is*user-friendly.. it's just |__|/::::::::\ ~  (_)       picky about its friends."
 


pgsql-hackers by date:

Previous
From: David Walter
Date:
Subject: New planner for like was -- Problem (bug?) with like
Next
From: mkscott@sacadia.com
Date:
Subject: Using Threads (again)