[ZBXNEXT-7122] Improve handling of hypertables with compressed chunks and disabled overrides in housekeeper Created: 2021 Nov 15  Updated: 2024 Apr 10  Resolved: 2022 Nov 08

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F), Server (S)
Affects Version/s: 5.4.7
Fix Version/s: 5.0.29rc1, 6.0.10rc1, 6.2.4rc1, 6.4.0beta2, 6.4 (plan)

Type: New Feature Request Priority: Trivial
Reporter: Edgars Melveris Assignee: Dmitrijs Goloscapovs
Resolution: Fixed Votes: 6
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2021-12-23-14-08-40-524.png     PNG File image-2021-12-23-14-11-01-427.png     PNG File image-2021-12-23-14-11-20-361.png     PNG File image-2021-12-23-14-14-34-239.png     PNG File image-2022-09-05-17-01-29-342.png     PNG File image-2022-09-05-17-01-38-218.png     PNG File image-2022-09-05-17-02-28-088.png     PNG File image-2022-09-05-17-11-29-965.png     PNG File image-2022-10-18-17-43-38-296.png     PNG File image-2022-11-08-13-03-26-641.png     PNG File screenshot-1.png    
Issue Links:
Causes
causes ZBX-21889 After upgrade to 6.0.10 Frontend show... Closed
Duplicate
Team: Team A
Sprint: Sprint 83 (Dec 2021), Sprint 84 (Jan 2022), Sprint 85 (Feb 2022), Sprint 86 (Mar 2022), Sprint 87 (Apr 2022), Sprint 88 (May 2022), Sprint 89 (Jun 2022), Sprint 90 (Jul 2022), Sprint 91 (Aug 2022), Sprint 92 (Sep 2022), Sprint 93 (Oct 2022), Sprint 94 (Nov 2022)
Story Points: 1

 Description   

Currently it is possible to set up Zabbix to use TimescaleDB and enable compression, but not select an override for trends or history.
According to documentation:

If using TimescaleDB, in order to take full advantage of TimescaleDB automatic partitioning of history and trends tables, Override item history period and Override item trend period options must be enabled as well as Enable internal housekeeping option for history and trends. Otherwise, the data kept in these tables will still be stored in partitions, however, the housekeeper will be cleaning the history and trends by deleting individual records rather than by dropping outdated partitions. When dropping of outdated partitions is enabled, Zabbix server and frontend will no longer keep track of deleted items and history for deleted items will be cleared when an outdated partition is deleted.

https://www.zabbix.com/documentation/current/manual/web_interface/frontend_sections/administration/general

This can lead to a situation where compression is enabled (and chunks read only) but housekeeper still tries to delete something from there:

5658:20211115:125542.665 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR:  cannot update/delete rows from chunk "_hyper_3_2099_chunk" as it is compressed
 [delete from history_uint where itemid=XXXX

We should only allow compression to be selected if overrides have been selected for trends and history. In addition not allow un-selecting them if compression is enabled.



 Comments   
Comment by Vladislavs Sokurenko [ 2021 Nov 15 ]

Yes, would be nice not to allow enabling compression if invalid configuration is present.

Also would be nice to warn user if not optimal configuration is present, if config.db.extension is set to timescale there should be some kind of indication in frontend if override item history period or override trend history period is not set.

Example warning next to "Override item history period": "Override period should be enabled to drop chunks instead of individual records"

Also change Override history period should not be possible to untick until compression is disabled.

Comment by Janis Freibergs [ 2022 Oct 25 ]

Implemented in:

Comment by Arturs Dancis [ 2022 Nov 04 ]

Documentation updated:

  • What's new (5.0.29, 6.0.10, 6.2.4)
  • TimescaleDB setup (5.0, 6.0, 6.2, 6.4)
  • Web Interface → Frontend sections → Reports → System information (5.0, 6.0, 6.2, 6.4)
  • Web Interface → Frontend sections → Administration:
Generated at Fri Jun 13 06:01:30 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.