Re: Small patch: Change calling convention for ShmemInitHash (and fix possible bug)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Small patch: Change calling convention for ShmemInitHash (and fix possible bug)
Date: 2016-03-25 12:17:15
Message-ID: CA+TgmoagyCi_Oqen3KisK-_W8JO-v2YLuocAOa4UVkwoeDr_Hg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 24, 2016 at 9:50 AM, Aleksander Alekseev
<a(dot)alekseev(at)postgrespro(dot)ru> wrote:
> I would like to continue discussion regarding changing calling
> convention for ShmemInitHash procedure:
>
> http://www.postgresql.org/message-id/CA+TgmoZm=Uowt8a_XaSfooGwufeeLJ861NTADiCEOpyFehV8Wg@mail.gmail.com
>
> Currently this procedure has two arguments --- init_size and max_size.
> But since shared hash tables have fixed size there is little sense to
> pass two arguments. In fact currently ShmemInitHash is always called
> with init_size == max_size with only one exception, InitLocks procedure
> (see lock.c), which I believe is actually a bug.

No, I think we left it that way on purpose. I don't remember the
discussion exactly, but I don't think it's hurting anything.

> Patch is attached.
>
> What do you think?

I don't think this actually buys us anything.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-03-25 12:20:15 Re: Support for N synchronous standby servers - take 2
Previous Message Robert Haas 2016-03-25 12:15:51 Re: Small patch: fix code duplication in heapam.c