Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
PDB 6.7.3
-
None
-
-
PuppetDB
-
2
-
Enhancement
-
Some additional indexing has been added to the catalog inputs storage which should improve query performance in some cases.
-
Needs Assessment
Description
When scoping this feature we specifically omitted any work to optimize storage/queries in order to limit the first round work. By doing this we also omitted a primary key, which means the table cannot be cleaned up by pg_repack. We should add a primary key to the table.
I believe this would work as a primary key.
ALTER TABLE catalog_inputs ADD CONSTRAINT catalog_inputs_pkey PRIMARY KEY (type, name, certname_id);
|
If we allow customers to add it ahead of time as a workaround, we'll need to preface the ADD CONSTRAINT command in the migration with the below command to drop the primary key because ADD CONSTRAINT doesn't support IF NOT EXISTS.
ALTER TABLE catalog_inputs DROP CONSTRAINT IF EXISTS catalog_inputs_pkey;
|