From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | vignesh C <vignesh21(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
Subject: | Re: Replication slot stats misgivings |
Date: | 2021-04-22 05:09:15 |
Message-ID: | CAD21AoCSTEnzrrpKNSBiv8L_zA4qiSL4xoM-7WgXE5j8y0ZZvw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Apr 22, 2021 at 1:50 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Thu, Apr 22, 2021 at 8:26 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> >
>
> Few comments:
> 1.
> I think we want stats collector to not use pgStatLocalContext unless
> it has read the stats file similar to other cases. So probably, we
> should allocate it in pgStatLocalContext when we read 'R' message in
> pgstat_read_statsfiles. Also, the function pgstat_get_replslot_entry
> should not use pgStatLocalContext to allocate the hash table.
Agreed.
> 2.
> + if (replSlotStatHash != NULL)
> + (void) hash_search(replSlotStatHash,
> + (void *) &(msg->m_slotname),
> + HASH_REMOVE,
> + NULL);
>
> Why have you changed this part from using NameStr?
I thought that since the hash table is created with the key size
sizeof(NameData) it's better to use NameData for searching as well.
> 3.
> +# Check that replicatoin slot stats are expected.
>
> Typo. replicatoin/replication
Will fix in the next version.
Regards,
--
Masahiko Sawada
EDB: https://www.enterprisedb.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Bharath Rupireddy | 2021-04-22 05:10:13 | PageGetItemIdCareful - should we MAXALIGN sizeof(BTPageOpaqueData)? |
Previous Message | Andrey Borodin | 2021-04-22 04:55:37 | Re: Synchronous commit behavior during network outage |