Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
dfb4908
Document configurable PostgreSQL storage design
mmpg-x86 Oct 14, 2026
953c8d2
Initialize pseudoterminals in display tests
mmpg-x86 Oct 15, 2026
ebb23b6
Parse opt-in PostgreSQL storage modes
mmpg-x86 Oct 15, 2026
8cc1137
Add PostgreSQL catalog migration foundation
mmpg-x86 Oct 15, 2026
282da5e
Support PostgreSQL for daemon storage
mmpg-x86 Oct 15, 2026
5ff2a61
Synchronize shared bug catalogs through PostgreSQL
mmpg-x86 Oct 15, 2026
0d7e948
Keep catalog merge bases until local changes are acknowledged
mmpg-x86 Oct 15, 2026
f0ab873
Keep imported discovery links scoped to their producer
mmpg-x86 Oct 15, 2026
1b9ef39
Honor the selected storage backend in database clients
mmpg-x86 Oct 15, 2026
dec5920
Provide OpenSSL dependencies for Linux Nix builds
mmpg-x86 Oct 15, 2026
9d63568
Run PostgreSQL integration coverage in CI
mmpg-x86 Oct 15, 2026
f74127a
Preserve ASCII subsystem scope matching on both backends
mmpg-x86 Oct 15, 2026
1256de8
Redact foreign duplicate history in scoped bug views
mmpg-x86 Oct 15, 2026
0a1ddeb
Bound pending catalog lookups to the requested bug views
mmpg-x86 Oct 15, 2026
67b4b3d
Preserve shared duplicate relationships during concurrent triage
mmpg-x86 Oct 15, 2026
b67bc94
Preserve analysis outcomes across shared catalog outages
mmpg-x86 Oct 15, 2026
44b0051
Recover ordinary PostgreSQL sessions after connection loss
mmpg-x86 Oct 15, 2026
ba8ef01
Keep the libSQL covering index for review statistics
mmpg-x86 Oct 15, 2026
3d64a2d
Exercise PostgreSQL adapter boundaries with deterministic fixtures
mmpg-x86 Oct 15, 2026
4447f1f
Describe PostgreSQL deployment and execution boundaries
mmpg-x86 Oct 15, 2026
56b079b
Keep shared publication scoped to the configured project
mmpg-x86 Oct 15, 2026
f5f686c
Scope PostgreSQL coordination locks to the configured schema
mmpg-x86 Oct 15, 2026
592d15d
Version shared mirror tracking and exclude local bookkeeping
mmpg-x86 Oct 15, 2026
44eb292
Reuse the shared catalog connection and TLS configuration
mmpg-x86 Oct 15, 2026
35b5c79
Discard PostgreSQL sessions after interrupted operations
mmpg-x86 Oct 15, 2026
672dbce
Classify transient catalog failures before refunding attempts
mmpg-x86 Oct 15, 2026
085e67a
Preserve legacy bug identifiers in project catalog namespaces
mmpg-x86 Oct 15, 2026
e875af3
Bound shared catalog synchronization with durable scheduling
mmpg-x86 Oct 15, 2026
490c9dc
Preserve original metadata when importing shared bug history
mmpg-x86 Oct 15, 2026
13fd37c
Match libSQL bug triage behavior on PostgreSQL
mmpg-x86 Oct 15, 2026
66e32d9
Verify the shared catalog readiness contract
mmpg-x86 Oct 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Describe PostgreSQL deployment and execution boundaries
Explain permissions for pre-created schemas and the initial serialized
execution model. Record connection recovery, buffered query results and
whole-record catalog transfers so operators can size deployments and
review the implementation limits.

Signed-off-by: Maciej Grochowski <maciej.grochowski@protonmail.com>
  • Loading branch information
mmpg-x86 committed Oct 15, 2026
commit 4447f1f72881487931366c9f42d6600fe1137eb3
10 changes: 9 additions & 1 deletion designs/DESIGN_POSTGRESQL_STORAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,20 @@ backend-specific, versioned migrations. PostgreSQL schema versioning must be
transactional and protected against concurrent daemon startups. Translate
SQLite triggers and JSON projections into PostgreSQL triggers or explicit
transactional writes, with tests proving equivalent behavior. Use PostgreSQL
an advisory transaction lock for worker claims and outbox leases, preserving
advisory transaction locks for worker claims and outbox leases, preserving
the existing single-writer transaction contract across daemon instances.
Canonical bug deduplication also takes a PostgreSQL session lock across
the candidate check and final write. Keep a single database
transaction for operations that currently depend on SQLite atomicity.

The first implementation serializes reads and writes with a database-wide
advisory lock. Explicit transactions use dedicated connections; ordinary
sessions reconnect before a later operation after connection loss, without
replaying failed writes. Transaction and deduplication sessions retain their
connection identity and fail when that session is lost. Query results are
buffered, and catalog updates transfer whole bug snapshots. Pooling, concurrent
read scaling and incremental evidence transfer remain future improvements.

## Shared bugs mode

PostgreSQL owns the shared catalog; each libSQL daemon keeps a local bug mirror
Expand Down
6 changes: 6 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ The default is `mode = "libsql"`. PostgreSQL can store the entire daemon
database, or act as a shared bug catalog for instances that keep their reviews
in libSQL. PostgreSQL requires TLS and a login that owns the configured schema
so startup migrations can create tables, indexes, and triggers.
An administrator can create the schema in advance and assign it to the
application login. An existing schema does not require database-level `CREATE`
permission; automatic creation of a missing schema does.

| Key | Type | Default | Description |
|-----|------|---------|-------------|
Expand Down Expand Up @@ -104,6 +107,9 @@ enabled = true
Set the PostgreSQL URL through deployment secrets in either configuration.
An existing libSQL database is not automatically moved when selecting full
PostgreSQL storage. Full mode creates an independent database schema.
The initial backend serializes database operations with a database-wide
advisory lock and uses dedicated sessions for explicit transactions. Select it
with that execution model in mind when sizing a deployment.

In shared catalog mode, each local database has a stable instance identity
and a local bug mirror. Changes enter a durable outbox in the same transaction
Expand Down