Skip to content

Commit

Permalink
update default table schema collection limit to 300 (#16880)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaOnThursday committed Feb 14, 2024
1 parent 7352738 commit 20bc215
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
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

0 comments on commit 20bc215

Please sign in to comment.