From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Optional message to user when terminating/cancelling backend |
Date: | 2017-06-22 00:24:54 |
Message-ID: | CAB7nPqRS9zY4QNhtq7=Xo_boYVKBqx57db=sKgUrEh79z-6UVA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 21, 2017 at 11:42 PM, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
> The message is truncated in SetBackendCancelMessage() for safety, but
> pg_{cancel|terminate}_backend() could throw an error on too long message, or
> warning truncation, to the caller as well. Personally I think a warning is the
> appropriate response, but I don’t really have a strong opinion.
And a NOTICE? That's what happens for relation name truncation. You
are right that having a check in SetBackendCancelMessage() makes the
most sense as bgworkers could just call the low level API. Isn't the
concept actually closer to just a backend message? This slot could be
used for other purposes than cancellation.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2017-06-22 00:29:08 | Re: PATCH: Batch/pipelining support for libpq |
Previous Message | Rod Taylor | 2017-06-21 23:56:35 | Re: RLS in CTE incorrect permission failure |