Re: [BUGS] BUG #6379: SQL Function Causes Back-end Crash

2012-01-04 Thread Tom Lane
I wrote: > Perhaps the intoRel stuff should be > saving/restoring the original destreceiver instead of just blindly > overwriting it. I concluded that was the best fix, and have committed it. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.or

Re: [BUGS] BUG #6379: SQL Function Causes Back-end Crash

2012-01-04 Thread Tom Lane
Paul Ramsey writes: > Further notes, from Andrew (RhodiumToad) on IRC about the cause of this > crasher: > [12:31pm] RhodiumToad: there's no trivial fix IMO the main bug here is that functions.c isn't expecting qd->dest to be overwritten, so we could work around it by keeping a separate private

Re: [BUGS] BUG #6379: SQL Function Causes Back-end Crash

2012-01-04 Thread Paul Ramsey
Further notes, from Andrew (RhodiumToad) on IRC about the cause of this crasher: [12:03pm] RhodiumToad: what happens is this [12:04pm] RhodiumToad: postquel_start know this statement doesn't return the result, so it supplies None_Receiver as the dest-receiver for the query [12:04pm] RhodiumToad: h

Re: [BUGS] BUG #6379: SQL Function Causes Back-end Crash

2012-01-04 Thread Pavel Stehule
2012/1/4 Paul Ramsey : > One extra detail, my PostgreSQL is compiled with --enable-cassert. > This seems to be what sets off the killer function. me too Pavel > > On Wed, Jan 4, 2012 at 11:25 AM, hubert depesz lubaczewski > wrote: >> On Wed, Jan 04, 2012 at 07:17:17PM +, pram...@cleverelep

Re: [BUGS] BUG #6379: SQL Function Causes Back-end Crash

2012-01-04 Thread Paul Ramsey
One extra detail, my PostgreSQL is compiled with --enable-cassert. This seems to be what sets off the killer function. On Wed, Jan 4, 2012 at 11:25 AM, hubert depesz lubaczewski wrote: > On Wed, Jan 04, 2012 at 07:17:17PM +, pram...@cleverelephant.ca wrote: >> The following bug has been logge

Re: [BUGS] BUG #6379: SQL Function Causes Back-end Crash

2012-01-04 Thread Pavel Stehule
Hello I can replicate it postgres=# select kill_backend(); NOTICE: table "foo" does not exist, skipping CONTEXT: SQL function "kill_backend" statement 1 The connection to the server was lost. Attempting reset: Failed. !> bash-4.2$ uname -a Linux nemesis 2.6.41.4-1.fc15.x86_64 #1 SMP Tue Nov 29

Re: [BUGS] BUG #6379: SQL Function Causes Back-end Crash

2012-01-04 Thread hubert depesz lubaczewski
On Wed, Jan 04, 2012 at 07:17:17PM +, pram...@cleverelephant.ca wrote: > The following bug has been logged on the website: > > Bug reference: 6379 > Logged by: Paul Ramsey > Email address: pram...@cleverelephant.ca > PostgreSQL version: 9.1.2 > Operating system: OSX 10.6.8

[BUGS] BUG #6379: SQL Function Causes Back-end Crash

2012-01-04 Thread pramsey
The following bug has been logged on the website: Bug reference: 6379 Logged by: Paul Ramsey Email address: pram...@cleverelephant.ca PostgreSQL version: 9.1.2 Operating system: OSX 10.6.8 Description: CREATE OR REPLACE FUNCTION kill_backend() RETURNS VOID AS $$ DRO