SUSE / telemetry-server

Proof of Concept Telemetry Server scaffolding
Apache License 2.0
2 stars 0 forks source link

Implement support for PostgreSQL DB type #28

Open rtamalin opened 2 months ago

rtamalin commented 2 months ago

Currently we are using SQLite3 as on SQL DB backend which is fine for initial developer testing.

However, for a production deployment we will need to support for database solutions that can be shared between multiple telemetry server instances.

As a first past we need to add support for using a PostgreSQL DB backend for the Staging, Operational and Telemetry DBs.

The main differences between SQLite3, and PostgreSQL, at least from the perspective of our current relatively simple SQL schemas and usage patterns, are:

  1. SQLite3 uses ? as the placeholder for provided arguments in an SQL statement, whereas PostgreSQL using $1, $2, and so on for it's placeholders.
  2. Table schema specifications for types and constraints may be slightly different
  3. DB Config settings will need to be able to specify credentials.
rtamalin commented 1 month ago

PR #32 makes a start at implementing this but there is still more work to do.