From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't call elog() while holding spinlock.
Date: Tue, 02 Jun 2020 10:22:53 +0000
Message-ID: <E1jg44L-0006FF-2f@gemulon.postgresql.org> (raw)
Don't call elog() while holding spinlock.
Previously UpdateSpillStats() called elog(DEBUG2) while holding
the spinlock even though the local variables that the elog() accesses
don't need to be protected by the lock. Since spinlocks are intended
for very short-term locks, they should not be used when calling
elog(DEBUG2). So this commit moves that elog() out of spinlock period.
Author: Kyotaro Horiguchi
Reviewed-by: Amit Kapila and Fujii Masao
Discussion: https://postgr.es/m/20200602.161518.1399689010416646074.horikyota.ntt@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/caa3c4242cf86322e2ed0c86199e6462a2c41565
Modified Files
--------------
src/backend/replication/walsender.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: fujii@postgresql.org
Subject: Re: pgsql: Don't call elog() while holding spinlock.
In-Reply-To: <E1jg44L-0006FF-2f@gemulon.postgresql.org>
References: <E1jg44L-0006FF-2f@gemulon.postgresql.org>
* 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