Re: [HACKERS] Optional message to user when terminating/cancelling backend

From: Andres Freund <andres(at)anarazel(dot)de>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>,Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>,Onder Kalaci <onder(at)citusdata(dot)com>,PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Optional message to user when terminating/cancelling backend
Date: 2018-08-12 09:01:13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On August 12, 2018 12:17:59 AM GMT+02:00, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>> On 6 Aug 2018, at 09:47, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>> Has there been any consideration to encodings?
>Thats a good point, no =/
>> What happens if the message contains non-ASCII characters, and the
>sending backend is connected to database that uses a different encoding
>than the backend being signaled?
>In the current state of the patch, instead of the message you get:
>FATAL: character with byte sequence 0xe3 0x82 0xbd in encoding "UTF8"
> no equivalent in encoding “ISO_8859_5"
>Thats clearly not good enough, but I’m not entirely sure what would be
>the best
>way forward. Restrict messages to only be in SQL_ASCII? Store the
>encoding of
>the message and check the encoding of the receiving backend before
>issuing it
>for a valid conversion, falling back to no message in case there is
>Neither seems terribly appealing, do you have any better suggestions?

Restricting to ASCII seems reasonable. But note that sqlascii isn't that (it's essentially just arbitrary null terminated data). Easier to relax later.

Sent from my Android device with K-9 Mail. Please excuse my brevity.

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2018-08-12 09:14:58 Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
Previous Message Pavel Stehule 2018-08-12 08:54:55 Re: [HACKERS] Optional message to user when terminating/cancelling backend