Re: pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.
Date: 2016-04-17 16:01:48
Message-ID: 9194.1460908908@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> Allow Pin/UnpinBuffer to operate in a lockfree manner.

Now that I've had some occasion to look around in bufmgr.c, I am very
unhappy that there are still boatloads of comments talking about a buffer
header's spinlock, when there is in fact no spinlock anymore. Please
expend some effort on making this less confusing for the next hacker.
Maybe make those comments talk about a "lock bit" instead?

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2016-04-17 17:04:37 Re: [HACKERS] Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Previous Message David Steele 2016-04-17 15:46:42 Re: [HACKERS] Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-04-17 16:32:23 Re: Move PinBuffer and UnpinBuffer to atomics
Previous Message Fabien COELHO 2016-04-17 15:54:11 Re: Pgbench with -f and -S