IBM Support

Never use UNIX kill -9 on any of the PureData System for Analytics UNIX Process IDs

Question & Answer


Question

What is the effect of issuing a UNIX kill -9 on one of the processes being used by the PureData System for Analytics database?

Answer

Issuing a UNIX kill -9 on any of the UNIX processes that compose the Netezza database's process hierarchy will most likely cause a database restart. Furthermore, the log files and the UNIX history command will contain a record of what happened.

Here is an example:


A user running the following select statement:

USER_DB(ADMIN)=> select count(*) from big_tbl;

The output of nzsession shows database SID 54679 and UNIX process ID (PID) 15564:

ID Type User Start Time PID Database State Priority Name Client IP Client PID Command
----- ---- ----- ----------------------- ----- -------- ------ ------------- --------- ---------- ------------------------
54679 sql ADMIN 29-May-14, 11:48:32 CDT 15564 USER_DB idle normal 127.0.0.1 15412 select count(*) from big
54697 sql ADMIN 29-May-14, 11:50:08 CDT 15821 SYSTEM active normal 127.0.0.1 15820 SELECT session_id, clien


Killing process 15564 with kill -9 brings entire database down:

[nz@vm-dw94 ~]$ kill -9 15564
[nz@vm-dw94 ~]$ nzstate
Error: DB connect failed: Read error. Lost connection to database server..


The main database log /nz/kit/log/postgres/pg.log contains the following:

2014-05-29 11:50:43.882438 CDT [15564] DEBUG: QUERY: select count(*) from big_tbl;
postgres (pid 15564) exited with status 9 at Thu May 29 11:50:54 2014 <--- Status 9 = kill -9
Terminating active backend processes and exiting.
2014-05-29 11:52:05.196366 CDT [17362] NOTICE: database system was shut down at 2014-05-29 11:52:05 CDT


Excerpt from UNIX history command:

[nz@vm-dw94 testsystem]$ export HISTTIMEFORMAT="%d/%m/%y %T"
[nz@vm-dw94 testsystem]$ history | grep kill
1010 29/05/14 11:50:54kill -9 15564


The original end user that was running a query through nzsql gets the following:

USER_DB(ADMIN)=> select count(*) from big_tbl;
pqFlush() -- connection not open
USER_DB(ADMIN)=>


The proper way to terminate this connection would have been to use the following command on the SID:

nzsession abort -id 54679

[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Database","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
17 October 2019

UID

swg21687525