Unable to terminate process started from PLV8 function

From: Mukesh Chhatani <chhatani(dot)mukesh(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Unable to terminate process started from PLV8 function
Date: 2018-06-13 17:47:44
Message-ID: CACnmOYJ4RNMWCafGgv=6C9oE+bpMZxMHAADFKoRmoBiA_Rr3rg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Team,

We are trying to use PLV8 function to calculate the histograms and while
testing the function
we found that with some of the data, function was going into the infinite
loop.

We tried to kill the session using pg_terminate_backend(pid) but process
could not get killed,
we terminated the process using kill pid still no luck , then we tried ,
kill -9 PID and it terminated postmaster also and restarted the database.

Below is the sample function to reproduce the infinite loop

CREATE FUNCTION test_infinite () returns void as $$ while (true) {(new
Date).toISOString(); } $$ LANGUAGE plv8 IMMUTABLE STRICT;;

Please let me know if someone has ever noticed this or is this the expected
behavior with PLV8 extension or do I have to report the issue to PLV8 or V8
groups.

Thanks for your help in advance.

Regards,
Mukesh

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-06-13 17:47:53 Re: Using GIT to caught delta between database versions
Previous Message Łukasz Jarych 2018-06-13 17:42:53 Using GIT to caught delta between database versions