Re: parallel workers and client encoding - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: parallel workers and client encoding
Date
Msg-id 447f6095-0833-0687-9b98-a953e0c436fa@2ndquadrant.com
Whole thread Raw
In response to parallel workers and client encoding  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: parallel workers and client encoding  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On 6/6/16 9:45 PM, Peter Eisentraut wrote:
> Attached is a patch to illustrates how this could be fixed.  There might
> be similar issues elsewhere.  The notification propagation in particular
> could be affected.

Tracing the code, NotificationResponse messages are converted to the 
client encoding during transmission from the worker to the leader and 
then sent on binarily to the client, so this should appear to work at 
the moment.  But it will break if we make a change like I suggested, 
namely changing the client encoding in the worker process to be the 
server encoding, because then nothing will transcode it before it 
reaches the client anymore.  So this will need a well-considered 
solution in concert with the error/notice issue.

Then again, it's not clear to me under what circumstances a parallel 
worker could or should be sending a NotificationResponse.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Reviewing freeze map code
Next
From: Peter Eisentraut
Date:
Subject: Re: proposal: PL/Pythonu - function ereport