     }
     
     deinit {
-        let observer = self.observer
         observer.cancel()
-        writer?.asyncWriteWithoutTransaction { db in
-            db.remove(transactionObserver: observer)
-        }
     }
 }

        if isCancelled { return }
        if let queue = notificationQueue {
            let onError = self.onError
            queue.async { [weak self] in
                guard let self = self else { return }
                if self.isCancelled { return }
                onError(error)
            }

    private var reducer: Reducer
    private let requiresWriteAccess: Bool
    private let observesSelectedRegion: Bool
    private weak var writer: DatabaseWriter?
    private let notificationQueue: DispatchQueue?
    private let reduceQueue: DispatchQueue
    private let onError: (Error) -> Void
