pgsql: Simplify leader error reporting for parallel apply worker failur

Started by Amit Kapila19 days ago1 messagescommitters
Jump to latest
#1Amit Kapila
akapila@postgresql.org

Simplify leader error reporting for parallel apply worker failures.

When a parallel apply worker failed, the leader copied the worker's error
context into its own error and appended the context of whatever it was
applying at that moment. The failed transaction was thus logged twice,
and the log read as if both contexts belonged to the same transaction.

The worker has already logged its error with the context of the failed
transaction. Have the leader report only that the worker exited due to an
error, using its own error context.

Author: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Author: vignesh C <vignesh21@gmail.com>
Reviewed-by: Zhijie Hou <houzhijie22@gmail.com>
Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>
Reviewed-by: Ajin Cherian <itsajin@gmail.com>
Reviewed-by: Takeshi Ideriha <iderihatakeshi@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: /messages/by-id/CALDaNm0SSCS5EJ_KNXau_3iCr_KrpKth=ZrTeOf1DCFbE=3=9w@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/952bab8b74d40fcfd25e1949865c3907e676504e

Modified Files
--------------
.../replication/logical/applyparallelworker.c | 46 +++++++---------------
1 file changed, 15 insertions(+), 31 deletions(-)