Re: Modernizing our GUC infrastructure

Junwang Zhao <zhjwpku@gmail.com>

From: Junwang Zhao <zhjwpku@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-09-06T03:02:30Z
Lists: pgsql-hackers
ah, yes, that makes sense ;)

On Tue, Sep 6, 2022 at 10:48 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Junwang Zhao <zhjwpku@gmail.com> writes:
> >   /*
> > - * Create table with 20% slack
> > + * Create hash table with 20% slack
> >   */
> >   size_vars = num_vars + num_vars / 4;
>
> > Should we change 20% to 25%, I thought that might be
> > a typo.
>
> No ... 20% of the allocated space is spare.
>
>                         regards, tom lane



-- 
Regards
Junwang Zhao



Commits

  1. Add auxiliary lists to GUC data structures for better performance.

  2. Replace the sorted array of GUC variables with a hash table.

  3. Store GUC data in a memory context, instead of using malloc().

  4. Make some minor improvements in memory-context infrastructure.