Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icUQF-0004nZ-SR for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Dec 2019 13:10:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1icUQE-0008NK-NS for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Dec 2019 13:10:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icUQE-0008ND-Bg for pgsql-bugs@lists.postgresql.org; Wed, 04 Dec 2019 13:10:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1icUQ7-0008U1-TU for pgsql-bugs@lists.postgresql.org; Wed, 04 Dec 2019 13:10:25 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xB4DACJL013042; Wed, 4 Dec 2019 08:10:12 -0500 From: Tom Lane To: MOHAN KUMAR DORAIRAJ cc: Mahendra Singh , Tomas Vondra , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16145: Not able to terminate active session In-reply-to: References: <16145-d617c77db801047b@postgresql.org> <20191203141147.lofq3gwn3u3vkkze@development> <20191203155458.jaauye67db32omk4@development> <20191203163818.vi4ocgg7mfo53fbz@development> Comments: In-reply-to MOHAN KUMAR DORAIRAJ message dated "Wed, 04 Dec 2019 11:34:51 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13040.1575465012.1@sss.pgh.pa.us> Date: Wed, 04 Dec 2019 08:10:12 -0500 Message-ID: <13041.1575465012@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk MOHAN KUMAR DORAIRAJ writes: > (gdb) bt > #0 0x00007f5503e826e0 in __read_nocancel () from /lib64/libpthread.so.0 > #1 0x00007f54eb392490 in snttread () from > /db/oraclnt/12.2.0/lib/libclntsh.so.12.1 > #2 0x00007f54eb391420 in nttfprd () from > /db/oraclnt/12.2.0/lib/libclntsh.so.12.1 > #3 0x00007f54eb387be0 in nsbasic_brc () from > /db/oraclnt/12.2.0/lib/libclntsh.so.12.1 > #4 0x00007f54eb37e654 in nioqrc () from > /db/oraclnt/12.2.0/lib/libclntsh.so.12.1 > #5 0x00007f54eb3987f9 in ttcdrv () from > /db/oraclnt/12.2.0/lib/libclntsh.so.12.1 > #6 0x00007f54eb382809 in nioqwa () from > /db/oraclnt/12.2.0/lib/libclntsh.so.12.1 > #7 0x00007f54eb36ce90 in upirtrc () from > /db/oraclnt/12.2.0/lib/libclntsh.so.12.1 > #8 0x00007f54eb378f86 in kpurcsc () from > /db/oraclnt/12.2.0/lib/libclntsh.so.12.1 > #9 0x00007f54eb3710c9 in kpuexec () from > /db/oraclnt/12.2.0/lib/libclntsh.so.12.1 > #10 0x00007f54eb36c639 in OCIStmtExecute () from > /db/oraclnt/12.2.0/lib/libclntsh.so.12.1 > #11 0x00007f54ec10eb32 in oracleExecuteQuery (session=0x1a16838, > oraTable=0x1a0e558, paramList=) at oracle_utils.c:1964 > #12 0x00007f54ec105940 in oracleIterateForeignScan (node=) > at oracle_fdw.c:1432 > #13 0x000000000062e58b in ForeignNext () > ... OK, so that's pretty much what we were afraid of: it's stuck in some I/O in the Oracle FDW, which means that said I/O code isn't aware of the conventions for query termination in Postgres. There isn't anything that PG as a whole can do about this. Perhaps talking to the Oracle FDW authors would yield something useful --- but they may not be able to fix it either, because it looks like this is way way down inside an Oracle-supplied library. regards, tom lane