pinakes-core: clarify backup support for postgresql

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I7f7d5dcb1d973c8615aacbfc0a5a44576a6a6964
This commit is contained in:
raf 2026-03-19 23:57:17 +03:00
commit e15dad208e
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -1171,11 +1171,15 @@ pub trait StorageBackend: Send + Sync + 'static {
async fn count_unresolved_links(&self) -> Result<u64>;
/// Create a backup of the database to the specified path.
/// Default implementation returns unsupported; `SQLite` overrides with
/// VACUUM INTO.
///
/// Only supported for SQLite (uses VACUUM INTO). PostgreSQL
/// deployments should use `pg_dump` directly; this method returns
/// `PinakesError::InvalidOperation` for unsupported backends.
async fn backup(&self, _dest: &std::path::Path) -> Result<()> {
Err(crate::error::PinakesError::InvalidOperation(
"backup not supported for this storage backend".to_string(),
"backup not supported for this storage backend; use pg_dump for \
PostgreSQL"
.to_string(),
))
}
}