Re: identifying the backend that owns a temporary schema - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: identifying the backend that owns a temporary schema
Date
Msg-id 20220823.181937.499485293703289968.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: identifying the backend that owns a temporary schema  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
At Tue, 16 Aug 2022 16:04:23 -0700, Nathan Bossart <nathandbossart@gmail.com> wrote in 
> On Mon, Aug 15, 2022 at 02:47:25PM -0700, Jeremy Schneider wrote:
> > I'll take a look at the patch if I can... and I'm hopeful that we're
> > able to move this idea forward and get this little gap in PG filled once
> > and for all!
> 
> Thanks!
> 
> I noticed that the "result" variable in pg_stat_get_backend_idset() is kind
> of pointless after my patch is applied, so here is a v2 with it removed.

It seems to be a sensible way to expose the PGPROC backend ids to SQL
interface.  It inserts bsearch into relatively frequently-called
function but (I believe) that doesn't seem to matter much (comparing
to, for example, the size of id->position translation table).

I don't think pgstat_fetch_stat_beentry needs to check for
out-of-range ids anymore. That case is a kind of rare and bsearch
properly handles it.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Reducing the chunk header sizes on all memory context types
Next
From: Kohei KaiGai
Date:
Subject: Re: Asynchronous execution support for Custom Scan