Jira (PDB-4640) Add a file index to catalog_resources for CD4PE Impact Analysis

14 views
Skip to first unread message

Adam Bottchen (JIRA)

unread,
Jan 29, 2020, 12:31:05 PM1/29/20
to puppe...@googlegroups.com
Adam Bottchen created an issue
 
PuppetDB / Improvement PDB-4640
Add a file index to catalog_resources for CD4PE Impact Analysis
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2020/01/29 9:30 AM
Priority: Major Major
Reporter: Adam Bottchen

As seen in CDPE-2850, CD4PE's impact analysis puts a great deal of stress on the catalog_resources table doing selects against the file row. We have seen in customer cases that performance can be greatly improved if an index is added and autovacuum frequency is increased:

CREATE INDEX catalog_resources_file_idx on catalog_resources USING gin (file gin_trgm_ops) WHERE file IS NOT NULL;
ALTER TABLE catalog_resources SET (autovacuum_analyze_scale_factor = 0.01);
ALTER INDEX catalog_resources_file_idx SET (fastupdate=false);

I do not see much downside to these changes being the default.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Austin Blatt (JIRA)

unread,
Jan 29, 2020, 1:53:05 PM1/29/20
to puppe...@googlegroups.com
Austin Blatt commented on Improvement PDB-4640
 
Re: Add a file index to catalog_resources for CD4PE Impact Analysis

Adam Bottchen any way we can get the database dump you mentioned so we can test its performance?

Austin Blatt (JIRA)

unread,
Jan 29, 2020, 2:22:05 PM1/29/20
to puppe...@googlegroups.com

Nick Walker (JIRA)

unread,
Jan 29, 2020, 6:03:03 PM1/29/20
to puppe...@googlegroups.com
Nick Walker commented on Improvement PDB-4640
 
Re: Add a file index to catalog_resources for CD4PE Impact Analysis

oh cool well if we have test data and infracore I'd think we should consider additional optimizations in addition to the index

Austin Blatt (JIRA)

unread,
Jan 30, 2020, 2:11:04 PM1/30/20
to puppe...@googlegroups.com

Austin Blatt (JIRA)

unread,
Feb 14, 2020, 12:35:04 PM2/14/20
to puppe...@googlegroups.com

Austin Blatt (JIRA)

unread,
Feb 14, 2020, 12:46:03 PM2/14/20
to puppe...@googlegroups.com
Austin Blatt updated an issue
Change By: Austin Blatt
Release Notes: Not Needed New Feature

Austin Blatt (JIRA)

unread,
Feb 14, 2020, 12:48:04 PM2/14/20
to puppe...@googlegroups.com
Austin Blatt updated an issue
Change By: Austin Blatt
Release Notes Summary: If you have the PostgreSQL extension pg_trgm configured, adds an index on the catalog_resources table's file column.

In a separate release notes entry, we have deprecated running PostgreSQL without the pg_trgm extension

Heston Hoffman (JIRA)

unread,
Feb 18, 2020, 2:06:05 PM2/18/20
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages