Re: Second call for platform testing

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Second call for platform testing
Дата
Msg-id 18188.1007406090@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Second call for platform testing  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Second call for platform testing  (Mark Knox <markk@pixin.net>)
Re: Second call for platform testing  (Mark Knox <segfault@hardline.org>)
Список pgsql-hackers
Mark Knox <segfault@hardline.org> writes:
>> Had a look at 7.2b3 and sadly it's failing several tests. I saw several 
>> "ERROR:  PGSTAT: Creation of DB hash table failed" which I haven't seen before.

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 */
 

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
potential for aliasing and is emitting code that loads pgStatDBHash
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.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Second call for platform testing
Следующее
От: Daniel Kalchev
Дата:
Сообщение: Re: 7.1.3 not using index