Re: [HACKERS] why do shmem attach? - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] why do shmem attach?
Date
Msg-id 37E640CC.5AC9C432@krs.ru
Whole thread Raw
In response to Re: [HACKERS] why do shmem attach?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] why do shmem attach?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> 
> Vadim Mikheev <vadim@krs.ru> writes:
> > Also, all this ShmemIndex stuff seems to be useless
> > (except of backend PID lookup but it's for sure
> > should be in separate hash table).
> 
> Have I got a deal for you ;-).  I have uncommitted changes that add
> a pointer (SHMEM_OFFSET that is) to each backend's PROC struct into
> the per-backend info array that already existed in shmem.c.  The
> routines in shmem.c that searched for PROC structures are now in
> sinval.c, and just do a simple scan of the ProcState array to find
> the PROC structs.  They should be a whole lot faster --- which is
> good since these things run with spinlocks held...

Nice. I have new member for PROC that should be searched
sometime -:)

Vadim


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Status on Jan Wieck
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Anyone understand shared buffer refcount mechanism?