ERRCODE_T_R_DEADLOCK_DETECTED

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: ERRCODE_T_R_DEADLOCK_DETECTED
Date: 2015-03-19 03:05:12
Message-ID: 20150319.120512.1245040145464332230.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The error code is used in two places:

ereport(ERROR,
(errcode(ERRCODE_T_R_DEADLOCK_DETECTED),
errmsg("canceling statement due to conflict with recovery"),
errdetail("User transaction caused buffer deadlock with recovery.")));

ereport(ERROR,
(errcode(ERRCODE_T_R_DEADLOCK_DETECTED),
errmsg("deadlock detected"),
errdetail_internal("%s", clientbuf.data),
errdetail_log("%s", logbuf.data),
errhint("See server log for query details.")));

The latter is a normal deadlock and can be obseved by stats because
pgstat_report_deadlock() is called.

The former is using the same error code but the meaning is pretty
different and users might be confused IMO.

I am not sure sharing the same error code is the best idea here.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2015-03-19 03:23:01 Re: Table-level log_autovacuum_min_duration
Previous Message Amit Kapila 2015-03-19 03:04:43 Re: Parallel Seq Scan