pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Atomic operations within spinlocks
Date: Thu, 04 Jun 2020 15:13:29 -0400
Message-ID: <1257109.1591298009@sss.pgh.pa.us> (raw)
In-Reply-To: <20200604190645.xumymtlefvqgdhfr@alap3.anarazel.de>
References: <1141819.1591208385@sss.pgh.pa.us>
	<20200603204542.reuladbmgmjqzoi6@alap3.anarazel.de>
	<1253593.1591293439@sss.pgh.pa.us>
	<1256132.1591296640@sss.pgh.pa.us>
	<20200604190645.xumymtlefvqgdhfr@alap3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> On 2020-06-04 14:50:40 -0400, Tom Lane wrote:
>> 2. The computed completePasses value would go backwards.  I bet
>> that wouldn't matter too much either, or at least we could teach
>> BgBufferSync to cope.  (I notice the comments therein suggest that
>> it is already designed to cope with completePasses wrapping around,
>> so maybe nothing needs to be done.)

> If we're not concerned about that, then we can remove the
> atomic-inside-spinlock, I think. The only reason for that right now is
> to avoid assuming a wrong pass number.

Hmm.  That might be a less-invasive path to a solution.  I can take
a look, if you don't want to.

			regards, tom lane





view thread (22+ messages)  latest in thread

Message-ID: <1257109.1591298009@sss.pgh.pa.us>
Permalink:  ../1257109.1591298009@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1257109.1591298009@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, pgsql-hackers@lists.postgresql.org
  Subject: Re: Atomic operations within spinlocks
  In-Reply-To: <1257109.1591298009@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox