pub enum ReconciliationMode {
Authoritative,
Additive,
Adopt,
}Expand description
Controls how aggressively pgroles converges the database to the manifest.
The diff engine always computes the full set of changes. The reconciliation
mode acts as a post-filter on the resulting Vec<Change>, stripping
out changes that the operator does not want applied.
Variants§
Authoritative
Full convergence — the manifest is the entire truth.
All changes (creates, alters, grants, revokes, drops) are applied. Anything present in the database but absent from the manifest is revoked or dropped.
Additive
Only grant, never revoke — safe for incremental adoption.
Additive mode filters out all destructive changes:
Revoke/RevokeDefaultPrivilegeRemoveMemberDropRoleand its retirement steps (TerminateSessions,ReassignOwned,DropOwned)
Use this when onboarding pgroles into an existing environment where you want to guarantee that no existing access is removed.
Adopt
Manage declared resources fully, but never drop undeclared roles.
Adopt mode is identical to authoritative except that it filters out
DropRole and associated retirement steps (TerminateSessions,
ReassignOwned, DropOwned). Revokes within the managed scope are
still applied.
Use this for brownfield onboarding where you want full privilege convergence for declared roles but don’t want pgroles to drop roles it doesn’t know about.
Trait Implementations§
Source§impl Clone for ReconciliationMode
impl Clone for ReconciliationMode
Source§fn clone(&self) -> ReconciliationMode
fn clone(&self) -> ReconciliationMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReconciliationMode
impl Debug for ReconciliationMode
Source§impl Default for ReconciliationMode
impl Default for ReconciliationMode
Source§fn default() -> ReconciliationMode
fn default() -> ReconciliationMode
Source§impl Display for ReconciliationMode
impl Display for ReconciliationMode
Source§impl PartialEq for ReconciliationMode
impl PartialEq for ReconciliationMode
Source§impl Serialize for ReconciliationMode
impl Serialize for ReconciliationMode
impl Copy for ReconciliationMode
impl Eq for ReconciliationMode
impl StructuralPartialEq for ReconciliationMode
Auto Trait Implementations§
impl Freeze for ReconciliationMode
impl RefUnwindSafe for ReconciliationMode
impl Send for ReconciliationMode
impl Sync for ReconciliationMode
impl Unpin for ReconciliationMode
impl UnsafeUnpin for ReconciliationMode
impl UnwindSafe for ReconciliationMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.