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

Re: [HACKERS] 'Waiting on lock'

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-patches" <pgsql-patches(at)postgresql(dot)org>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Subject: Re: [HACKERS] 'Waiting on lock'
Date: 2007-06-20 16:29:18
Message-ID: 87ps3qr3mp.fsf@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-patches
"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
>> Is it possible for unlocking the semaphore to wake another process other than
>> our own? In which case checking log_lock_waits before signalling the semaphore
>> arguably locks us into having log_lock_waits be PGC_POSTMASTER.
>
> How you figure that?

Well I'm not clear exactly what's going on with the semaphores here. If it's
possible for to be printing the messages only as a result of another backend
unlocking the semaphore then making the PGSemaphoreUnlock conditional on
log_lock_waits means you can't enable log_lock_waits after startup and get
deterministic behaviour because whether you get messages will depend on which
other backend happens to wake you up.

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com


In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2007-06-20 16:36:25
Subject: Re: [HACKERS] 'Waiting on lock'
Previous:From: Tom LaneDate: 2007-06-20 15:47:28
Subject: Re: [HACKERS] 'Waiting on lock'

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group