Tags: pgEdge/ace
Tags
test: extend awaitDataSync to also compare row content digest Counts alone miss UPDATE-only drift: subtests that modify field values without changing row counts leave the two-node table content temporarily divergent while their cleanup repair replicates. The old gate returned immediately in that window, letting the next subtest start against drifted state. Add a hashtext-sum row digest alongside the count check. The digest is order-independent and PK-agnostic, so it generalises across tables and catches UPDATE-induced drift that counts cannot see.
fix: close pgxpool in processReplicationStream to prevent connection … …leak processReplicationStream acquired a pgxpool via auth.GetClusterNodeConnection on entry and never closed it — no defer, no cleanup on any return path. Every call to UpdateFromCDC or ListenForChanges leaked one pool, and each leaked pool retains a backgroundHealthCheck goroutine plus its connections. Under repeated invocations (e.g. the CDC regression tests with -count=10) leaked connections accumulated until Postgres refused new clients with "sorry, too many clients already" (SQLSTATE 53300). Add the defer immediately after the pool acquisition so all return paths release it, including the long-running continuous ListenForChanges case. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PreviousNext