Source-postgres: Add prepareThreshold=0 to JDBC url to mitigate PGBouncer prepared statement [X] already exists. - #26873
Conversation
Before Merging a Connector Pull RequestWow! What a great pull request you have here! 🎉 To merge this PR, ensure the following has been done/considered for each connector added or updated:
If the checklist is complete, but the CI check is failing,
|
|
/test connector=connectors/source-postgres
Build PassedTest summary info: |
|
/test connector=connectors/source-postgres-strict-encrypt
Build PassedTest summary info: |
Affected Connector ReportNOTE
|
| Connector | Version | Changelog | Publish |
|---|---|---|---|
source-alloydb |
2.0.28 |
✅ | ✅ |
source-alloydb-strict-encrypt |
2.0.28 |
🔵 (ignored) |
🔵 (ignored) |
source-postgres-strict-encrypt |
2.0.33 |
🔵 (ignored) |
🔵 (ignored) |
- See "Actionable Items" below for how to resolve warnings and errors.
✅ Destinations (0)
| Connector | Version | Changelog | Publish |
|---|
- See "Actionable Items" below for how to resolve warnings and errors.
✅ Other Modules (0)
Actionable Items
(click to expand)
| Category | Status | Actionable Item |
|---|---|---|
| Version | ❌ mismatch |
The version of the connector is different from its normal variant. Please bump the version of the connector. |
| ⚠ doc not found |
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug. |
|
| Changelog | ⚠ doc not found |
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug. |
| ❌ changelog missing |
There is no chnagelog for the current version of the connector. If you are the author of the current version, please add a changelog. | |
| Publish | ⚠ not in seed |
The connector is not in the cloud or oss registry, so its publication status cannot be checked. This can be normal (e.g. some connectors are cloud-specific, and only listed in the cloud seed file). Please double-check to make sure that you have added a metadata.yaml file and the expected registries are enabled. |
|
/connector-performance connector=connectors/source-postgres Note: The following
|
|
/connector-performance connector=connectors/source-postgres dataset=10m Note: The following
|
Coverage report for source-postgres
|
There was a problem hiding this comment.
nit: you can give a reason or refer to issue no.
There was a problem hiding this comment.
Done!
fc63d7b to
ff25060
Compare
…on poolers Adds prepareThreshold=0 to the HikariCP data source configuration to disable server-side prepared statements. This fixes the 'prepared statement S_1 already exists' error that occurs when using connection poolers like PgBouncer or Supabase Supavisor in transaction mode. This matches the fix already applied to source-postgres in PR #26873. Resolves: airbytehq/oncall#11014 Co-Authored-By: unknown <>
What
24796
prepared statement [X] already exists.How
prepareThreshold=0in the jdbcUrl. The side effect of this is that there will be no server-side caching of frequently issued statements. Per Akash Kulkarni (@akashkulk)'s findings, this would not affect Airbyte's usecase as we rarely issue the same query multiple times. And in the case that we do, this isn't the bottleneck factor for our queries. Execution of those queries is. (see link above for more info)Without prepareThreshold=0:
Run 1: total secs: 43.056. total MB read: 524.6431999206543, rps: 51350.82218506132, throughput: 12.185135635466702
Run 2: total secs: 42.063. total MB read: 524.6431999206543, rps: 52563.083945510305, throughput: 12.47279556666558
Run 3: total secs: 42.059. total MB read: 524.6431999206543, rps: 52568.082931120574, throughput: 12.47398178560247
With prepareThreshold=0:
Run 1: total secs: 43.056. total MB read: 524.6431999206543, rps: 51350.82218506132, throughput: 12.185135635466702
Run 2: total secs: 42.065. total MB read: 524.6431999206543, rps: 52560.58480922382, throughput: 12.472202541796133
Run 3: total secs: 43.059. total MB read: 524.6431999206543, rps: 51347.24447850624, throughput: 12.184286674578006
Recommended reading order
PostgresSourceTest.javaPostgresSource.java🚨 User Impact 🚨
There should be no negative user impact. They should see less of the error mentioned above.