Re: [patch] Adding an assertion to report too long hash table name

Поиск
Список
Период
Сортировка
От Junwang Zhao
Тема Re: [patch] Adding an assertion to report too long hash table name
Дата
Msg-id CAEG8a3LFKfROOCqEmXKD0SWN+gDfPLK2CURzHnZfnvs+N+y-Og@mail.gmail.com
обсуждение исходный текст
Ответ на [patch] Adding an assertion to report too long hash table name  (Xiaoran Wang <wxiaoran@vmware.com>)
Список pgsql-hackers
LGTM
+1

On Thu, Sep 29, 2022 at 9:38 AM Xiaoran Wang <wxiaoran@vmware.com> wrote:
>
> Hi,
>
> The max size for the shmem hash table name is SHMEM_INDEX_KEYSIZE - 1.
> but when the caller uses a longer hash table name, it doesn't report any error, instead
> it just uses the first SHMEM_INDEX_KEYSIZE -1 chars as the hash table name.
>
> I created some shmem hash tables with the same prefix which was longer than
> SHMEM_INDEX_KEYSIZE - 1, and the size of those hash tables were the same,
> then only one hash table was created. But I thought those hash tables were created
> successfully.
>
> I know this is a corner case, but it's difficult to figure it out when run into it. So I add
> an assertion to prevent it.
>
>
> Thanks,
> Xiaoran



-- 
Regards
Junwang Zhao



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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: Eliminating SPI from RI triggers - take 2
Следующее
От: Etsuro Fujita
Дата:
Сообщение: Re: Obsolete comment in ExecInsert()