Re: [HACKERS] Optional message to user when terminating/cancelling backend
Christoph Berg <myon@debian.org>
From: Christoph Berg <myon@debian.org>
To: Eren Başak <eren@citusdata.com>
Cc: Daniel Gustafsson <daniel@yesql.se>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Yugo Nagata <nagata@sraoss.co.jp>, Thomas Munro <thomas.munro@enterprisedb.com>, Michael Paquier <michael.paquier@gmail.com>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2018-03-20T12:41:42Z
Lists: pgsql-hackers
Re: Eren Başak 2018-03-20 <CAFNTstPcstV8Brqkg00a84V72b_FfnLinhu2C2Top+QssmwFhg@mail.gmail.com> > Another thing is that, in a similar manner, we could allow changing the > error code which might be useful for extensions. For example, Citus could > use it to cancel remote backends when it detects a distributed deadlock and > changes the error code to something retryable while doing so. Another useful thing to do on top of this patch would be to include messages when the termination comes from postgres itself, e.g. on a server shutdown. Possibly, the message for pg_terminate_backend() itself could say that someone invoke that, unless overridden. FATAL: 57P01: terminating connection due to administrator command: server shutting down FATAL: 57P01: terminating connection due to administrator command: restarting because of a crash of another server process FATAL: 57P01: terminating connection due to administrator command: terminated by pg_terminate_backend() Christoph
Commits
-
Refactor user-facing SQL functions signalling backends
- 09921f397b84 12.0 landed
-
Introduce 64-bit hash functions with a 64-bit seed.
- 81c5e46c490e 11.0 cited