Finer grained driver loading in SQL receivers #39918
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Between 0.123.0 and 0.124.0, the footprint of the
postgresql
receiver increased sharply when participating in custom builds. As an experiment, builds using the configuration below were done for both 0.123.0 and 0.124.0 releases in MacOS.The generated binary size increased significantly
The problem was found to be the recent inclusion of the internal
sqlquery
package (PR #39311): this package registers drivers for all kinds of databases, and thus thepostgresql
receiver got many new (unneeded) dependencies.With this PR, the
internal/sqlquery
package no longer registers drivers for all possible databases: instead this task is expected to be done by the actual users of the package, who know best what drivers they are going to need.Apart from the
postgresql
receiver, thesqlserver
one got its dependencies accordingly trimmed.