Commit 1fcb4a7
committed
fix(replication): correct Postgres epoch constant in replication client
The keepalive decode and standby status ack used 946080000000 as the
Postgres-to-Unix epoch offset (ms). That value is 1999-12-25, seven days
short of the real Postgres epoch (2000-01-01 = 946684800000). Replace both
literals with a shared POSTGRES_EPOCH_MS constant matching pgoutput.ts.
The affected timestamps are observability-only: the decoded keepalive
timestamp is unused by consumers, and the encoded standby-reply timestamp
only surfaces as pg_stat_replication.reply_time. WAL feedback is driven by
the LSN bytes, so slot advancement is unaffected.1 parent 65c545d commit 1fcb4a7
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
12 | 20 | | |
13 | 21 | | |
14 | 22 | | |
| |||
363 | 371 | | |
364 | 372 | | |
365 | 373 | | |
366 | | - | |
| 374 | + | |
367 | 375 | | |
368 | 376 | | |
369 | 377 | | |
| |||
658 | 666 | | |
659 | 667 | | |
660 | 668 | | |
661 | | - | |
| 669 | + | |
662 | 670 | | |
663 | 671 | | |
664 | 672 | | |
| |||
0 commit comments