From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Adjust assertion in GetCurrentCommandId.
Date: Thu, 21 Dec 2017 18:21:36 +0000
Message-ID: <E1eS5TM-0006yK-Nc@gemulon.postgresql.org> (raw)
Adjust assertion in GetCurrentCommandId.
currentCommandIdUsed is only used to skip redundant increments of the
command counter, and CommandCounterIncrement() is categorically denied
under parallelism anyway. Therefore, it's OK for
GetCurrentCommandId() to mark the counter value used, as long as it
happens in the leader, not a worker.
Prior to commit e9baa5e9fa147e00a2466ab2c40eb99c8a700824, the slightly
incorrect check didn't matter, but now it does. A test case added by
commit 1804284042e659e7d16904e7bbb0ad546394b6a3 uncovered the problem
by accident; it caused failures with force_parallel_mode=on/regress.
Report and review by Andres Freund. Patch by me.
Discussion: http://postgr.es/m/20171221143106.5lhtygohvmazli3x@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cce1ecfc77385233664de661d6a1b8b3c5d3d3f5
Modified Files
--------------
src/backend/access/transam/xact.c | 6 +++---
1 file changed, 3 insertions(+), 3 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: rhaas@postgresql.org
Subject: Re: pgsql: Adjust assertion in GetCurrentCommandId.
In-Reply-To: <E1eS5TM-0006yK-Nc@gemulon.postgresql.org>
References: <E1eS5TM-0006yK-Nc@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