Re: Second call for platform testing

From: Mark Knox <markk(at)pixin(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Second call for platform testing
Date: 2001-12-03 21:58:59
Message-ID: 20011203165858.A20858@hardline.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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."

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-12-03 22:09:23 Re: date formatting and tab-complete patch
Previous Message Daniel Kalchev 2001-12-03 21:51:21 Re: 7.1.3 not using index