Re: system views for walsender activity

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: system views for walsender activity
Date: 2011-01-12 02:03:30
Message-ID: AANLkTi=mBL8sZDpx8gC35mJHxEV8q6K0qBbYJuw41TDH@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 11, 2011 at 7:24 AM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>> No, do this at top
>>
>> if (walsnd->state == state)
>>  return;
>>
>> Keep spinlocks when actually setting it.

I think this is safe...

> Aha. Thanks for the pointers, pfa a new version.

...but I think you also need to take the spinlock when reading the value.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-01-12 02:06:09 Re: arrays as pl/perl input arguments [PATCH]
Previous Message Cédric Villemain 2011-01-12 02:00:12 Re: Allowing multiple concurrent base backups