mirror of
https://github.com/postgres/postgres.git
synced 2025-11-28 11:44:57 +03:00
code: replace 'master' with 'leader' where appropriate.
Leader already is the more widely used terminology, but a few places didn't get the message. Author: Andres Freund Reviewed-By: David Steele Discussion: https://postgr.es/m/20200615182235.x7lch5n6kcjq4aue@alap3.anarazel.de
This commit is contained in:
@@ -750,7 +750,7 @@ GetCurrentCommandId(bool used)
|
||||
{
|
||||
/*
|
||||
* Forbid setting currentCommandIdUsed in a parallel worker, because
|
||||
* we have no provision for communicating this back to the master. We
|
||||
* we have no provision for communicating this back to the leader. We
|
||||
* could relax this restriction when currentCommandIdUsed was already
|
||||
* true at the start of the parallel operation.
|
||||
*/
|
||||
@@ -987,7 +987,7 @@ ExitParallelMode(void)
|
||||
/*
|
||||
* IsInParallelMode
|
||||
*
|
||||
* Are we in a parallel operation, as either the master or a worker? Check
|
||||
* Are we in a parallel operation, as either the leader or a worker? Check
|
||||
* this to prohibit operations that change backend-local state expected to
|
||||
* match across all workers. Mere caches usually don't require such a
|
||||
* restriction. State modified in a strict push/pop fashion, such as the
|
||||
@@ -2164,13 +2164,13 @@ CommitTransaction(void)
|
||||
else
|
||||
{
|
||||
/*
|
||||
* We must not mark our XID committed; the parallel master is
|
||||
* We must not mark our XID committed; the parallel leader is
|
||||
* responsible for that.
|
||||
*/
|
||||
latestXid = InvalidTransactionId;
|
||||
|
||||
/*
|
||||
* Make sure the master will know about any WAL we wrote before it
|
||||
* Make sure the leader will know about any WAL we wrote before it
|
||||
* commits.
|
||||
*/
|
||||
ParallelWorkerReportLastRecEnd(XactLastRecEnd);
|
||||
@@ -2699,7 +2699,7 @@ AbortTransaction(void)
|
||||
latestXid = InvalidTransactionId;
|
||||
|
||||
/*
|
||||
* Since the parallel master won't get our value of XactLastRecEnd in
|
||||
* Since the parallel leader won't get our value of XactLastRecEnd in
|
||||
* this case, we nudge WAL-writer ourselves in this case. See related
|
||||
* comments in RecordTransactionAbort for why this matters.
|
||||
*/
|
||||
@@ -4488,7 +4488,7 @@ RollbackAndReleaseCurrentSubTransaction(void)
|
||||
|
||||
/*
|
||||
* Unlike ReleaseCurrentSubTransaction(), this is nominally permitted
|
||||
* during parallel operations. That's because we may be in the master,
|
||||
* during parallel operations. That's because we may be in the leader,
|
||||
* recovering from an error thrown while we were in parallel mode. We
|
||||
* won't reach here in a worker, because BeginInternalSubTransaction()
|
||||
* will have failed.
|
||||
|
||||
Reference in New Issue
Block a user