diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index ef301b6328add..2512a6d35483a 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -597,7 +597,7 @@ CopyGetData(CopyState cstate, void *databuf, int minread, int maxread) int mtype; readmessage: - HOLD_CANCEL_INTERRUPTS(); + //HOLD_CANCEL_INTERRUPTS(); pq_startmsgread(); mtype = pq_getbyte(); if (mtype == EOF) @@ -608,7 +608,7 @@ CopyGetData(CopyState cstate, void *databuf, int minread, int maxread) ereport(ERROR, (errcode(ERRCODE_CONNECTION_FAILURE), errmsg("unexpected EOF on client connection with an open transaction"))); - RESUME_CANCEL_INTERRUPTS(); + //RESUME_CANCEL_INTERRUPTS(); switch (mtype) { case 'd': /* CopyData */ diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 63a1994e61ed3..582eafc24b23a 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -323,7 +323,7 @@ SocketBackend(StringInfo inBuf) /* * Get message type code from the frontend. */ - HOLD_CANCEL_INTERRUPTS(); + //HOLD_CANCEL_INTERRUPTS(); pq_startmsgread(); qtype = pq_getbyte(); @@ -480,7 +480,7 @@ SocketBackend(StringInfo inBuf) } else pq_endmsgread(); - RESUME_CANCEL_INTERRUPTS(); + //RESUME_CANCEL_INTERRUPTS(); return qtype; } @@ -2649,6 +2649,8 @@ StatementCancelHandler(SIGNAL_ARGS) { int save_errno = errno; + elog(NOTICE, "StatementCancelHandler invoked on %d", MyProcPid); + /* * Don't joggle the elbow of proc_exit */ @@ -2662,6 +2664,7 @@ StatementCancelHandler(SIGNAL_ARGS) SetLatch(MyLatch); errno = save_errno; + raise(SIGUSR1); } /* signal handler for floating point exception */ diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index eb6960d93fae7..731a59ab584da 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -1161,6 +1161,8 @@ StatementTimeoutHandler(void) { int sig = SIGINT; + + elog(NOTICE, "StatementTimeoutHandler invoked on %d", MyProcPid); /* * During authentication the timeout is used to deal with * authentication_timeout - we want to quit in response to such timeouts.