Subject: [pgjdbc/pgjdbc] PR #3780: fix: avoid NullPointerException when cancelling a query if cancel key is not known yet

From: "vlsi (@vlsi)" <[email-masked]>
Date: Thu, 21 Aug 2025 13:32:22 +0000

Previously, and unknown cancel key might cause a NPE.

See https://github.com/pgjdbc/pgjdbc/issues/3530#issuecomment-2948773054

---

From: "davecramer (@davecramer)" <[email-masked]>
Date: Thu, 21 Aug 2025 13:35:59 +0000

interesting, I'm still curious how cancel would have been called with a null cancel key since the key is sent pretty early in the connection startup?

---

From: "vlsi (@vlsi)" <[email-masked]>
Date: Thu, 21 Aug 2025 13:45:58 +0000

Stacktrace at https://github.com/pgjdbc/pgjdbc/issues/3530#issuecomment-2948773054 indicates there are cases when the cancelKey is null.

---

From: "davecramer (@davecramer)" <[email-masked]>
Date: Thu, 21 Aug 2025 13:49:01 +0000

> Stacktrace at [#3530 (comment)](https://github.com/pgjdbc/pgjdbc/issues/3530#issuecomment-2948773054) indicates there are cases when the cancelKey is null.

Not debating the existence, just curious how it can happen. Not really important. Just curiousity

---

From: "vlsi (@vlsi)" <[email-masked]>
Date: Thu, 21 Aug 2025 14:47:59 +0000

Frankly, I've no idea how is it possible.

---

From: "krystianzybala (@krystianzybala)" <[email-masked]>
Date: Fri, 22 Aug 2025 08:08:31 +0000

Nice job! 

@vlsi Can I ask you, are you going to make release soon? What is ETA for new release?