Skip to content

Logical Replication #924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: 16/edge
Choose a base branch
from

Conversation

Zvirovyi
Copy link
Contributor

This is an implementation of the Logical Replication specification (On-Review): https://docs.google.com/document/d/1f84Z4cZwUD4q4bJsXTTC_PUaZr7pPB0Q6HnQ9cgCX_o/edit?usp=sharing.

Important

I cannot merge the latest postgresql-k8s lib revision therefore cannot create a new release because of the significant change made to this lib on the 14 channel, that prevents 16 channel from working when merged.

Basic testing

  1. deploy postgresql and postgresql2
  2. deploy two data-integrator charms with the database-name=testdb config and integrate them with the both of postgresql charms
  3. establish logical replication relation: juju integrate postgresql:logical-replication-offer postgresql2:logical-replication
  4. create testing table with data in the postgresql: create table asd (message text); insert into asd values ('hello');
  5. create the same table (but empty) on the postgresql2 side
  6. configure logical replication: juju config postgresql2 logical_replication_subscription_request='{"testdb": ["public.asd"]}'
  7. check testing table on postgresql2 side: select * from asd;, and observe the data copied from the postgresql publisher
  8. add another data to the testing table on postgresql side and observe it was pushed to the postgresql2 subscriber

@Zvirovyi Zvirovyi force-pushed the logical-replication-config-16 branch from 2c60d7a to d96c232 Compare May 31, 2025 09:09
Copy link

codecov bot commented Jun 2, 2025

Codecov Report

Attention: Patch coverage is 20.57971% with 274 lines in your changes missing coverage. Please review.

Project coverage is 66.01%. Comparing base (59e6ff2) to head (621c98b).

Files with missing lines Patch % Lines
src/relations/logical_replication.py 18.32% 250 Missing and 4 partials ⚠️
src/backups.py 37.50% 8 Missing and 2 partials ⚠️
src/charm.py 54.54% 3 Missing and 2 partials ⚠️
src/cluster.py 16.66% 5 Missing ⚠️

❌ Your patch check has failed because the patch coverage (20.57%) is below the target coverage (33.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project check has failed because the head coverage (66.01%) is below the target coverage (70.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           16/edge     #924      +/-   ##
===========================================
- Coverage    70.23%   66.01%   -4.22%     
===========================================
  Files           16       17       +1     
  Lines         3723     4067     +344     
  Branches       541      592      +51     
===========================================
+ Hits          2615     2685      +70     
- Misses         974     1240     +266     
- Partials       134      142       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Zvirovyi Zvirovyi mentioned this pull request Jun 5, 2025
@Zvirovyi Zvirovyi force-pushed the logical-replication-config-16 branch 4 times, most recently from fc023d6 to 4058c70 Compare June 8, 2025 12:48
@Zvirovyi Zvirovyi force-pushed the logical-replication-config-16 branch from 4058c70 to ef1aed4 Compare June 8, 2025 12:53
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.

1 participant