Skip to content

Configuring stellar-core to use SQLite instead of PostgreSQL #875

@leighmcculloch

Description

@leighmcculloch

I noticed that the quickstart image currently starts PostgreSQL whenever stellar-core is enabled, and maintains a separate core database for stellar-core's data.

However, stellar-core supports SQLite, and captive-core (used by both Horizon and RPC) already uses SQLite successfully within this same image.

With RPC becoming more prevalent as the primary interface (vs Horizon), there may be scenarios where users run stellar-core and RPC instead of stellar-core, Horizon, and RPC - in which case PostgreSQL would be running solely for core's database.

If stellar-core switched to SQLite instead:

  • PostgreSQL would only start when Horizon is enabled
  • The image would be lighter/simpler for core+RPC configurations which will probably become the default configuration in the future
  • This aligns with how captive-core already operates

Concerns:

  • Users running persistent mode might expect to query core's PostgreSQL database directly
  • This would be a breaking change for existing persistent volumes that have a core database
  • I've made breaking changes to the image before without hearing complaints, so it's hard to gauge if anyone actually relies on this

Questions:

  1. Is anyone querying stellar-core's database directly via PostgreSQL?
  2. Would switching to SQLite for stellar-core cause issues for your workflow?

Looking for feedback before considering any changes.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions