I guess it all depends on your usage pattern. If you use WeeWX the normal way: writes are done by the main thread, while the reporting threads do only reads, it should not be a problem. Right now, many RESTful threads often read the same database file, indeed, the same database table, simultaneously without problem.
OTOH, if you try to write from something other than the main thread, then you might get contention. Both the main thread and your thread could be seeking EXCLUSIVE locks, leading to writer starvation. -tk On Sun, Sep 5, 2021 at 9:54 AM Karen K <[email protected]> wrote: > I now read through the code, and I am not sure. As I understood the code, > each binding opens its own database connection. They do not only open a new > cursor. So those database connections can compete, and I do not know what > happens when they access the database file simultaneously. And as I cannot > test it in a definite way, I will create different files. > > [email protected] schrieb am Donnerstag, 2. September 2021 um 14:39:27 > UTC+2: > >> I've never tried it, but I don't see why it can't be done. >> >> On Thu, Sep 2, 2021 at 4:16 AM Karen K <[email protected]> wrote: >> >>> Is it possible to have multiple sections in [DataBindings], that refer >>> to the same database (and thus database file), but different table_names? >>> >>> Like that: >>> [DataBindings] >>> ... >>> [[binding1]] >>> data_base = xxx_sqlite >>> table_name = table1 >>> ... >>> [[binding2]] >>> data_base = xxx_sqlite >>> table_name = table2 >>> ... >>> [Databases] >>> ... >>> [[xxx_sqlite]] >>> database_name = xxx.sdb >>> database_type = SQLite >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "weewx-user" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/weewx-user/a99f2ac9-7ea4-4754-aaa0-335c14455c4cn%40googlegroups.com >>> <https://groups.google.com/d/msgid/weewx-user/a99f2ac9-7ea4-4754-aaa0-335c14455c4cn%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "weewx-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/613b8af1-d942-49b9-9041-fd9fa8e69124n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/613b8af1-d942-49b9-9041-fd9fa8e69124n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEAk3mEX7QMt8YAjRbfiBMuaHBJuR7khoQ70XCxtVBYSTg%40mail.gmail.com.
