pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
回复: [BUGS] BUG #13762: server will crash after superuser alterfunction and set client_encoding
2+ messages / 1 participants
[nested] [flat]

* 回复: [BUGS] BUG #13762: server will crash after superuser alterfunction and set client_encoding
@ 2015-11-10 00:40 ` 笑见江湖 <funnyxj@qq.com>
  1 sibling, 0 replies; 2+ messages in thread

From: 笑见江湖 @ 2015-11-10 00:40 UTC (permalink / raw)
  To: Haribabu Kommi <kommi.haribabu@gmail.com>; +Cc: pgsql-bugs

Sorry, the correct statements is:
 
1. alter function koi8r_to_utf8(integer, integer, cstring, internal, integer) set work_mem = '4MB';
2. set client_encoding = 'koi8';
3. select 1;




------------------ 原始邮件 ------------------
发件人: "Haribabu Kommi";<kommi.haribabu@gmail.com>;
发送时间: 2015年11月9日(星期一) 晚上8:24
收件人: "笑见江湖"<funnyxj@qq.com>; 
抄送: "pgsql-bugs@postgresql.org"<pgsql-bugs@postgresql.org>; 
主题: Re: [BUGS] BUG #13762: server will crash after superuser alterfunction and set client_encoding



On Mon, Nov 9, 2015 at 9:41 PM,  <funnyxj@qq.com> wrote:
> The following bug has been logged on the website:
>
> Bug reference:      13762
> Logged by:          funnyxj
> Email address:      funnyxj@qq.com
> PostgreSQL version: 9.4.5
> Operating system:   linux
> Description:
>
> When superuser execute the following statements, the server will crash, it
> may be a bug.
> statements:
>
> 1. alter function koi8r_to_utf8(integer, integer, cstring, internal,
> integer) set work_mem = default ;
> 2. set client_encoding = 'koi8';
> 3. select 1;

I am not able to reproduce this issue.

[kommih@localhost bin]$ ./psql postgres
psql (9.4.5)
Type "help" for help.

postgres=# alter function koi8r_to_utf8(integer, integer, cstring, internal,
integer) set work_mem = default ;
ALTER FUNCTION
postgres=# set client_encoding = 'koi8';
SET
postgres=# select 1;
 ?column?
----------
        1
(1 row)


Regards,
Hari Babu
Fujitsu Australia


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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* 回复: [BUGS] BUG #13762: server will crash after superuser alter function and set client_encoding
@ 2015-11-10 00:51 ` 笑见江湖 <funnyxj@qq.com>
  1 sibling, 0 replies; 2+ messages in thread

From: 笑见江湖 @ 2015-11-10 00:51 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

Although its is in the category of "don't do that",  but server crashed is dangerous. If I alter a function to "set work_mem = '4MB'", it should be no problem and reasonable.


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;






------------------ 原始邮件 ------------------
发件人: "Tom Lane";<tgl@sss.pgh.pa.us>;
发送时间: 2015年11月9日(星期一) 晚上10:45
收件人: "笑见江湖"<funnyxj@qq.com>; 
抄送: "pgsql-bugs"<pgsql-bugs@postgresql.org>; 
主题: Re: [BUGS] BUG #13762: server will crash after superuser alter function and set client_encoding



funnyxj@qq.com writes:
> When superuser execute the following statements, the server will crash, it
> may be a bug.

> 1. alter function koi8r_to_utf8(integer, integer, cstring, internal,
> integer) set work_mem = default ;

That would be in the category of "don't do that".  Encoding conversion
functions are invoked using special code paths that don't support every
possible option for functions, so I'm not too surprised that this breaks
things (and I see no reason to expend effort to try to make it not be
broken).

FWIW, I can't reproduce a crash with the described case either, so
I think there's probably some additional condition required.  But
it doesn't really matter.  Mucking with the properties of built-in
functions isn't considered a supported thing to do.

			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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-11-10 00:51 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-11-10 00:40 ` 笑见江湖 <funnyxj@qq.com>
2015-11-10 00:51 ` 回复: [BUGS] BUG #13762: server will crash after superuser alter function and set client_encoding 笑见江湖 <funnyxj@qq.com>

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