Re: optimize lookups in snapshot [sub]xip arrays

From: Zhang Mingli <zmlpostgres(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: optimize lookups in snapshot [sub]xip arrays
Date: 2022-07-25 04:28:23
Message-ID: E5777552-8152-49B7-8F82-5C6FB6287D90@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Got it, thanks.

Regards,
Zhang Mingli

> On Jul 25, 2022, at 12:08, Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
> On Sun, Jul 24, 2022 at 12:48:25PM +0800, Zhang Mingli wrote:
>> If snaphost->suboverflowed is false then the subxcnt must be less than PGPROC_MAX_CACHED_SUBXIDS which is 64 now.
>>
>> And we won’t use hash if the xcnt is less than XIP_HASH_MIN_ELEMENTS which is 128 currently during discussion.
>>
>> So that, subxid’s hash table will never be used, right?
>
> This array will store up to TOTAL_MAX_CACHED_SUBXIDS transactions, which
> will typically be much greater than 64. When there isn't any overflow,
> subxip stores all of the subxids for all of the entries in the procarray.
>
> --
> Nathan Bossart
> Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2022-07-25 04:30:44 Re: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS
Previous Message Amit Kapila 2022-07-25 04:20:58 Re: Handle infinite recursion in logical replication setup