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
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
|
@@ -131,6 +131,8 @@ public static Source sshWrappedSource() { | |||
@Override | |||
public JsonNode toDatabaseConfig(final JsonNode config) { | |||
final List<String> additionalParameters = new ArrayList<>(); | |||
//Initialize parameters with prepareThreshold=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you can give a reason or refer to issue no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
fc63d7b
to
ff25060
Compare
What
24796
prepared statement [X] already exists.
How
prepareThreshold=0
in the jdbcUrl. The side effect of this is that there will be no server-side caching of frequently issued statements. Per @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.java
PostgresSource.java
🚨 User Impact 🚨
There should be no negative user impact. They should see less of the error mentioned above.