Skip to content

[DOP-23742] Fix writing to Postgres and Greenplum behind PGBouncer#336

Merged
dolfinus merged 1 commit intodevelopfrom
bugfix/DOP-23742
Feb 6, 2025
Merged

[DOP-23742] Fix writing to Postgres and Greenplum behind PGBouncer#336
dolfinus merged 1 commit intodevelopfrom
bugfix/DOP-23742

Conversation

@dolfinus
Copy link
Member

@dolfinus dolfinus commented Feb 5, 2025

Change Summary

Depends on #337.

Fixed issue with writing data to PG/GP instances behind pgbouncer with pool_mode=transaction, caused by pgjdbc/pgjdbc#848. Added PGBouncer to docker-compose and CI workflows, running tests on PG/GP with and without PGBouncer.

Behavior is almost the same as before, except rare case of Postgres/Greenplum calling connection.fetch("SELECT function()") where function calls DML/DDL - previously this failed due to read-only connection, now it's not. This was sacrificed for pgbounce support.

Related issue number

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

@dolfinus dolfinus self-assigned this Feb 5, 2025
@dolfinus dolfinus changed the title [DOP-23742] Fix using conn.setReadOnly(...) for Postgres, Greenplum, MySQL, MSSQL [DOP-23742] Fix writing to Postgres and Greenplum behind PGBouncer Feb 6, 2025
@codecov
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.02%. Comparing base (fef4ecc) to head (6fb3cf0).
Report is 69 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #336      +/-   ##
===========================================
+ Coverage    91.89%   92.02%   +0.12%     
===========================================
  Files          228      228              
  Lines         9836     9840       +4     
  Branches      1008     1008              
===========================================
+ Hits          9039     9055      +16     
+ Misses         605      598       -7     
+ Partials       192      187       -5     

☔ 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.

@dolfinus dolfinus marked this pull request as ready for review February 6, 2025 09:53
@dolfinus dolfinus enabled auto-merge (rebase) February 6, 2025 13:36
@dolfinus dolfinus merged commit 82445f0 into develop Feb 6, 2025
52 checks passed
@dolfinus dolfinus deleted the bugfix/DOP-23742 branch February 6, 2025 13:47
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.

2 participants