Re: [Patch] Optimize dropping of relation buffers using dlist

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: tsunakawa(dot)takay(at)fujitsu(dot)com
Cc: thomas(dot)munro(at)gmail(dot)com, amit(dot)kapila16(at)gmail(dot)com, k(dot)jamison(at)fujitsu(dot)com, tanghy(dot)fnst(at)fujitsu(dot)com, andres(at)anarazel(dot)de, tgl(at)sss(dot)pgh(dot)pa(dot)us, robertmhaas(at)gmail(dot)com, tomas(dot)vondra(at)2ndquadrant(dot)com, pgsql-hackers(at)postgresql(dot)org, jankirk(dot)jamison(at)gmail(dot)com
Subject: Re: [Patch] Optimize dropping of relation buffers using dlist
Date: 2021-03-12 06:10:07
Message-ID: 20210312.151007.451330135688048202.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Fri, 12 Mar 2021 05:26:02 +0000, "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com> wrote in
> From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
> > > uint64
> >
> > +1
>
> Thank you, the patch is attached (we tend to forget how large our world is... 64-bit) We're sorry to cause you trouble.

BUF_DROP_FULL_SCAN_THRESHOLD cannot be larger than the size of int
since Nbuffer is an int. but nBlocksToInvalidate being uint32 looks
somewhat too tight. So +1 for changing it to uint64.

We need fill all block[file][fork] array in DropRelFileNodesAllBuffers
so we cannot bailing out from the counting loop. We could do that
DropRelFileNodesAllBuffers but that doesn't seem effective so much.

So I vote for uint64 and not bailing out.

About the patch, it would be better to change the type of
BUF_DROP_FULL_SCAN_THRESHOLD to uint64, even though the current value
doesn't harm.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2021-03-12 06:13:15 Re: shared-memory based stats collector
Previous Message Julien Rouhaud 2021-03-12 05:55:46 Re: [PATCH] Hooks at XactCommand level