Re: libpq async duplicate error results

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq async duplicate error results
Date: 2022-01-26 13:52:03
Message-ID: alpine.DEB.2.22.394.2201261448060.3813395@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> command = SELECT pg_terminate_backend(pg_backend_pid());
> result 1 status = PGRES_FATAL_ERROR
> error message = "FATAL: terminating connection due to administrator command
> "
> result 2 status = PGRES_FATAL_ERROR
> error message = "FATAL: terminating connection due to administrator command
> server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
> "

> Also, why are there multiple results being generated in the first place?

My interpretation is that the first message is a close message issued by
the server before actually severing the connection, and the second message
is generated by libpq when it notices that the connection has been closed,
so there is some sense in having to results to report these two
consecutive errors, and the question might be about when the buffer should
be reset.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2022-01-26 13:55:27 Re: Schema variables - new implementation for Postgres 15
Previous Message Pavel Stehule 2022-01-26 13:43:54 Re: Schema variables - new implementation for Postgres 15