Re: SQLSTATE for replication connection failures

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: SQLSTATE for replication connection failures
Date: 2021-06-16 15:53:50
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> writes:
> On Mon, Jun 14, 2021 at 6:18 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>>> Shall we just use ERRCODE_CONNECTION_FAILURE for these failures, or
>>> would it be better to invent another SQLSTATE code? Arguably,
>>> ERRCODE_CONNECTION_FAILURE is meant for failures of client connections;
>>> but on the other hand, a replication connection is a sort of client.

>> Your reasoning sounds good to me. So, +1 for using ERRCODE_CONNECTION_FAILURE.

> +1

Done that way. I also fixed some nearby ereports that were missing
errcodes; some of them seemed more like PROTOCOL_VIOLATIONs than

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo NAGATA 2021-06-16 15:59:34 Re: pgbench bug candidate: negative "initial connection time"
Previous Message Robert Haas 2021-06-16 15:52:45 Re: [bug?] Missed parallel safety checks, and wrong parallel safety