Skip to content
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

update default table schema collection limit to 300 #16880

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions postgres/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ files:
Maximum amount of tables the Agent collects from the instance.
value:
type: number
example: 1000
display_default: 1000
example: 300
display_default: 300
- name: max_columns
description: |
Maximum amount of columns the Agent collects per table.
Expand Down
1 change: 1 addition & 0 deletions postgres/changelog.d/16880.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update default table schema collection limit to 300
4 changes: 2 additions & 2 deletions postgres/datadog_checks/postgres/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,10 @@ instances:
#
# enabled: false

## @param max_tables - number - optional - default: 1000
## @param max_tables - number - optional - default: 300
## Maximum amount of tables the Agent collects from the instance.
#
# max_tables: 1000
# max_tables: 300

## @param max_columns - number - optional - default: 50
## Maximum amount of columns the Agent collects per table.
Expand Down
2 changes: 1 addition & 1 deletion postgres/datadog_checks/postgres/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def _get_table_info(self, cursor, dbname, schema_id):

If any tables are partitioned, only the master paritition table name will be returned, and none of its children.
"""
limit = self._config.schemas_metadata_config.get("max_tables", 1000)
limit = self._config.schemas_metadata_config.get("max_tables", 300)
if self._config.relations:
if VersionUtils.transform_version(str(self._check.version))["version.major"] == "9":
cursor.execute(PG_TABLES_QUERY_V9.format(schema_oid=schema_id))
Expand Down
Loading