Subject: Re: [pgjdbc/pgjdbc] PR #3698: fix: updateStatus message to microseconds since midnight 01-01-1970 instead of using nanotime

From: "vlsi (@vlsi)" <[email-masked]>
Date: Mon, 30 Jun 2025 11:24:11 +0000

Can we somehow test this?

---

From: "davecramer (@davecramer)" <[email-masked]>
Date: Mon, 30 Jun 2025 11:26:36 +0000

> Can we somehow test this?

we have the debezium test, although I'm not sure this is tested.

---

From: "vlsi (@vlsi)" <[email-masked]>
Date: Thu, 03 Jul 2025 07:06:00 +0000

(on pgjdbc/src/main/java/org/postgresql/core/v3/replication/V3PGReplicationStream.java:222)

How do we test that the order of the arguments here is right? Would any test fail if the code was like `between(now, POSTGRES_EPOCH_2000_01_01);` ?

---

From: "davecramer (@davecramer)" <[email-masked]>
Date: Thu, 03 Jul 2025 15:41:26 +0000

according to the docs of Duration.between() `The result of this method can be a negative period if the end is before the start. To guarantee to obtain a positive duration call abs() on the result.` So we could do that?

---

From: "vlsi (@vlsi)" <[email-masked]>
Date: Thu, 03 Jul 2025 15:47:27 +0000

No no no. I do not suggest adding abs. I just mean that it is often the case for a `+` vs `-` or `between(POSTGRES_EPOCH_2000_01_01, now)` vs `between(now, POSTGRES_EPOCH_2000_01_01)` errors. Sure one of them is right, and I just wonder how can we be sure the code is right here.

---

From: "davecramer (@davecramer)" <[email-masked]>
Date: Mon, 07 Jul 2025 15:01:19 +0000

fixed