Skip to content

v2.6.0

Latest

Choose a tag to compare

@github-actions github-actions released this 14 Oct 14:23
501e5de

v2.6.0 corrects WAL acknowledgement positions and updates the supported Node.js baseline. The package is available on npm as pg-logical-replication@2.6.0.

Compatibility and upgrade notes

  • Node.js 22 or later is required. Node.js 20 is no longer supported. Upgrade your runtime before installing this version.
  • acknowledge(lsn) now sends the supplied LSN unchanged, instead of adding one byte. Pass the exclusive end position of durably processed WAL, and remove any -1 compensation for the previous increment.
  • For transaction-end checkpoints, use pgoutput's commitEndLsn, or wal2json's nextlsn with includeLsn: true. The LSN passed to a wal2json data handler is not necessarily the transaction end.
  • Public method signatures and replication configuration options remain unchanged.

Fixes

  • Preserve WAL end positions in all three standby acknowledgement fields: written, flushed, and applied. This addresses the one-byte-ahead acknowledgement reported during PostgreSQL failover slot synchronization. Thanks to @savv for the report, fix, and wire-level regression tests! (#222)

Build and CI

  • Upgrade to TypeScript 7 and replace ts-jest with @swc/jest. npm test runs TypeScript checking before Jest. (#218)
  • Update locked dependencies, including pg, Jest, protobufjs, and type definitions.
  • Test Node.js 22, 24, and 26 across PostgreSQL 14–18, and wait for PostgreSQL readiness before starting tests. (#223)
  • Keep fork PR tests running while skipping test-report publishing when the fork token cannot write checks. (#224)

Validation

All 31 tests pass across the 15 Node.js/PostgreSQL CI combinations. New coverage includes ACK wire encoding, persisted checkpoints, reconnection, upgrading existing checkpoints, and callers using a -1 workaround with wal2json and pgoutput.

A live primary/standby failover has not been verified by this test suite.

New contributor

Welcome and thank you to Chris Savvopoulos (@savv) for his first contribution in #222! Chris is also credited in the package's contributors list.

Full changelog: v2.5.0...v2.6.0