-
Type:
Problem report
-
Resolution: Unresolved
-
Priority:
Trivial
-
None
-
Affects Version/s: 7.4.11
-
Component/s: Server (S)
-
None
-
Environment:* Zabbix Server: 7.4.11
* PostgreSQL: 17.10
* TimescaleDB: 2.26.4
* Debian 13
* Official Zabbix packages
* Package: zabbix-sql-scripts 7.4.11
PostgreSQL + TimescaleDB primary key migration leaves trends_uint without primary key while frontend still reports "Database history tables use primary key: No"
Following the official documentation for PostgreSQL + TimescaleDB primary key migration, all supplied migration scripts were executed successfully.
Executed scripts:
- history_upgrade_prepare.sql
- history_upgrade.sql
- history_upgrade_uint.sql
- history_upgrade_log.sql
- history_upgrade_str.sql
- history_upgrade_text.sql
- trends_upgrade.sql
All scripts completed successfully.
The following tables now have primary keys:
- history
- history_uint
- history_str
- history_text
- history_log
- trends
However:
```
trends_uint
```
still has *no PRIMARY KEY*.
Verification:
```sql
SELECT conname, pg_get_constraintdef(oid)
FROM pg_constraint
WHERE conrelid = 'trends_uint'::regclass
AND contype = 'p';
```
returns no rows.
The frontend still reports:
```
Database history tables use primary key: No
```
The package `zabbix-sql-scripts 7.4.11` does not contain any migration script for `trends_uint`.
Directory contents:
```
history_upgrade_prepare.sql
history_upgrade.sql
history_upgrade_uint.sql
history_upgrade_log.sql
history_upgrade_str.sql
history_upgrade_text.sql
trends_upgrade.sql
```
There is no `trends_upgrade_uint.sql`.
*Questions*
- Is the migration incomplete?
- Is `trends_uint` intentionally excluded?
- Does the frontend incorrectly expect a primary key on `trends_uint`?
- Or is a migration script missing from the package?
At the moment it is impossible to reach the expected frontend state ("Database history tables use primary key: Yes") by following the official migration procedure.