Hi ,
When a user tries to enter a large query, thinking the server is still running, and to their surprise, they discover that the server has crashed or stopped, I have observed that the psql process will still be running if it is idle even after the server crashes or stops. solved this using 2 methods: 1) using a thread (supports --with-readline and --without-readline) To address this surprise circumstance, I created a patch that creates a new thread within the psql process to monitor the File Descriptor of the psql process,this thread will monitor for -1 or 0 on psql’s FD using select() and recv() functions .If either one of the value is returned we terminate the psql process. 2) Doing the same thing as above but in single process using readline callbacks(only supports --with-readline) Regards, Srinath Reddy Sadipiralla Member Technical Staff Zoho
0001-Kill-psql-process-with-thread-implementation.patch
Description: Binary data
0001-Kill-psql-process-with-single-process-implementation.patch
Description: Binary data