Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Fix spinlock usage in UnpinBuffer()


  • From: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
  • To: pgsql-patches(at)postgresql(dot)org
  • Subject: Re: Fix spinlock usage in UnpinBuffer()
  • Date: Thu, 29 Dec 2005 14:18:16 -0500
  • Message-id: <dp1cnk$h7p$1@news.hub.org> <text/plain>

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote
>
> I noticed that shmem.c holds ShmemIndexLock considerably longer than any
> other spinlock is held, and across operations that could theoretically
> fail (hashtable manipulations).  This doesn't matter a lot in the Unix
> code because only the postmaster ever executes ShmemInitStruct, but
> in the Windows port we run that code every time a backend is launched.
> I think that we could convert that spinlock to an LWLock.  Will look into 
> it.
>

Yeah, use LWLock is a safer way in order to recover to unlock status.

Regards,
Qingqing 





Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group