From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Condition variable live lock |
Date: | 2018-01-05 15:28:10 |
Message-ID: | 15204.1515166090@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> writes:
> Could we install the sentinel and pop the first entry at the same
> time, so that we're not adding an extra spinlock acquire/release?
Hm, maybe. Other ideas in that space:
* if queue is empty when we first acquire the spinlock, we don't
have to do anything at all.
* if queue is empty after we pop the first entry, we needn't bother
installing our sentinel, just signal that proc and we're done.
It's a question of how complicated you're willing to make this
logic, and whether you trust that we'll be able to test all the
code paths.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2018-01-05 15:30:23 | Re: Failed to delete old ReorderBuffer spilled files |
Previous Message | Peter Eisentraut | 2018-01-05 14:56:37 | Re: pgsql: Implement channel binding tls-server-end-point for SCRAM |