Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
PDB 4.0.0
-
PuppetDB
-
Reviewed
-
2 - 5-25% of Customers
-
3 - Serious
-
4 - $$$$$
-
-
32574,35133
-
2
-
Enhancement
-
Description
Currently we store report-ttl days of events in the resource_events table in the puppetdb database.
Some customers have performance issues using the API endpoints that read from resource_events that could be mitigated or resolved by reducing the number of days of events that are stored in that table.
In cases where customers would like to store more reports like 30-60 days of reports they may not desire storing that many days of events as events tend to be more useful for watching things that changed recently.
I would be good to have an option to seperate these concerns and allow customers to tune in production for their own preferences.
Side note: I'm not tied to the name "resource-events-ttl" I just figured people would know what I meant by reading that.
Delete Query:
DELETE FROM resource_events
|
WHERE timestamp < NOW() - INTERVAL '1 days';
|
Bash code:
echo "DELETE FROM resource_events WHERE timestamp < NOW() - INTERVAL '1 days';" > /tmp/delete_resource_events.sql
|
su - pe-postgres -s /bin/bash -c "/opt/puppetlabs/server/bin/psql -d pe-puppetdb -f /tmp/delete_resource_events.sql"
|
Another thought
If implemented would resource-events-ttl have it's own GC API command or would it just fall under report-ttl? It could probably just be under the report-ttl but should run before the delete from reports does.
Attachments
Issue Links
- relates to
-
PDB-4420 SPIKE: Partitioning of tables
-
- Resolved
-
-
PDB-4466 Partitioning of resource_events: GC by dropping expired partitions
-
- Resolved
-
-
PDB-4467 Partitioning of resource_events: Migrate existing events to partitioned tables
-
- Resolved
-
-
PDB-4468 Partitioning of resource_events: Migration test for initial creation of partitions
-
- Resolved
-
-
PDB-2477 Refactor GC processes to avoid cascades
-
- Closed
-
-
PDB-4420 SPIKE: Partitioning of tables
-
- Resolved
-
-
PDB-4466 Partitioning of resource_events: GC by dropping expired partitions
-
- Resolved
-
-
PDB-4467 Partitioning of resource_events: Migrate existing events to partitioned tables
-
- Resolved
-
-
PDB-4468 Partitioning of resource_events: Migration test for initial creation of partitions
-
- Resolved
-
-
PDB-4280 Ensure PE upgrade will work properly with reports migration
-
- Closed
-
-
PDB-3635 Add ability to disable storage of resource events
-
- Resolved
-
-
PUP-7454 The schedule metaparameter should allow for suppressing skip events
-
- Closed
-