#does zha support postgresql?
1 messages · Page 1 of 1 (latest)
You can use a different database for the recorder: https://www.home-assistant.io/integrations/recorder/
yeah, thanks. i see that option for recorder but how about zha?
No. The ZHA integration can only use the sqlite db.
oh really...
Hmmmm, re-reading the docs, it accepts a database_path parameter in the configuration, so you might be able to use the recorder syntax for postgresql. But, I’ve never seen anyone do something like that.
i see that database path i used to set path to sqlite file 😭
Looking at the source, it uses zigpy for the database and zigpy uses sqlite. So, I’m pretty sure my statement is accurate.
I do find it interesting that your sqlite db corrupted while running under K8. That’s unusual and would lead me to think you have a problem in your cluster as opposed to ZHA having an issue.
i run pretty slow storage on synology ds620slim. i have 6x5t smr (SMR!) drives. any kind of write is a pain. i use nfs4 right now to mount HA storage. i have separate postgresql cluster here which has good nvme drives underneath
To be fair, running under K8 is still considered “unsupported”. With that said, the sqlite write-ahead functionality should handle even the slowest of storage.
And slow storage wouldn’t cause the database to corrupt unless you have some very chatty sensors.
yeah, maybe it does not like that it could take tens of seconds to sync that sqlite file and that happens all the time?
sqlite is not a resilient solution to store data though
i remember that last time file was around 400mb. not sure how chatty are the sensors
It shouldn’t really matter. The write ahead takes care of it, even into minutes of time.