pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: 笑见江湖 <funnyxj@qq.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: Re: [BUGS] 回复: [BUGS] BUG #13762: server will crash after superuser alter function and set client_encoding
Date: Mon, 09 Nov 2015 23:14:36 -0500
Message-ID: <15569.1447128876@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqQrCrPK363Ls+qmhsXkxhzJ6Xrsf+qD4qKgR+aBG75TjA@mail.gmail.com>
References: <20151109104125.2569.45365@wrigleys.postgresql.org>
	<22805.1447080354@sss.pgh.pa.us>
	<tencent_5C106B6934A0F0A048A28456@qq.com>
	<CAB7nPqQrCrPK363Ls+qmhsXkxhzJ6Xrsf+qD4qKgR+aBG75TjA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Michael Paquier <michael.paquier@gmail.com> writes:
> On Tue, Nov 10, 2015 at 9:51 AM, 笑见江湖 <funnyxj@qq.com> wrote:
>> Sorry, the correct statements which make server crash is:
>> 
>> 1. alter function koi8r_to_utf8(integer, integer, cstring, internal,
>> integer) set work_mem = '4MB';
>> 2. set client_encoding = 'koi8';
>> 3. select 1;

> This indeed crashes, and that's not limited to this particular
> function, try for example iso8859_to_utf8 with ISO_8859_6 as
> client_encoding on even a different parameter for the same result.
> FWIW, here is a backtrace with assertions enabled:

Yeah... if you trace through this, you'll notice that (1) calling a
function having non-null proconfig requires fetching its pg_proc entry,
and (2) fetching anything from a catalog requires being inside a live
transaction, and (3) the client/server encoding translation functions have
to be invokable outside any transaction.  So as I said, this is not
going to work and we are not very interested in making it work.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (2+ messages)

Message-ID: <15569.1447128876@sss.pgh.pa.us>
Permalink:  ../15569.1447128876@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15569.1447128876@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael.paquier@gmail.com, funnyxj@qq.com
  Subject: Re: [BUGS] 回复: [BUGS] BUG #13762: server will crash after superuser alter function and set client_encoding
  In-Reply-To: <15569.1447128876@sss.pgh.pa.us>
  References: <20151109104125.2569.45365@wrigleys.postgresql.org> <22805.1447080354@sss.pgh.pa.us> <tencent_5C106B6934A0F0A048A28456@qq.com> <CAB7nPqQrCrPK363Ls+qmhsXkxhzJ6Xrsf+qD4qKgR+aBG75TjA@mail.gmail.com> <15569.1447128876@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox