Skip to content

fix(postgres): skip replication-byte recorder in test-connection - #790

Open
Tyagiquamar wants to merge 1 commit into
powersync-ja:mainfrom
Tyagiquamar:fix/test-connection-skip-replication-metrics
Open

fix(postgres): skip replication-byte recorder in test-connection#790
Tyagiquamar wants to merge 1 commit into
powersync-ja:mainfrom
Tyagiquamar:fix/test-connection-skip-replication-metrics

Conversation

@Tyagiquamar

Copy link
Copy Markdown

Summary

  • test-connection runs in TEST_CONNECTION mode, which never registers replication metrics.
  • PostgresModule still installed a jpgwire recorder that reads DATA_REPLICATED_BYTES, so the CLI failed with PSYNC_S0001 before the connection check ran.
  • Skip that recorder in TEST_CONNECTION mode. Maintainer confirmed on Postgres test-connection fails because replication-byte metric is not registered #751 that metrics are not needed for this command.

Fixes #751

Test plan

  • pnpm --filter @powersync/service-module-postgres exec vitest run test/src/metrics_recorder.test.ts (2 passed)
  • test-connection against a valid PostgreSQL replication config reports the connection result instead of the missing-counter error

TEST_CONNECTION does not register DATA_REPLICATED_BYTES, so installing the jpgwire recorder made the CLI fail before the connection check ran.
@changeset-bot

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8a4224c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@powersync/service-module-postgres Patch
@powersync/service-schema Patch
@powersync/service-image Patch
@powersync/service-core Patch
@powersync/service-module-convex Patch
@powersync/service-module-core Patch
@powersync/service-module-mongodb-storage Patch
@powersync/service-module-mongodb Patch
@powersync/service-module-mssql Patch
@powersync/service-module-mysql Patch
@powersync/service-module-postgres-storage Patch
test-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Postgres test-connection fails because replication-byte metric is not registered

2 participants