Skip to main content

SubscriptionOptions

Struct SubscriptionOptions 

Source
pub struct SubscriptionOptions {
Show 13 fields pub enabled: Option<bool>, pub slot_name: Option<Identifier>, pub create_slot: Option<bool>, pub copy_data: Option<bool>, pub synchronous_commit: Option<String>, pub binary: Option<bool>, pub streaming: Option<StreamingMode>, pub two_phase: Option<bool>, pub disable_on_error: Option<bool>, pub password_required: Option<bool>, pub run_as_owner: Option<bool>, pub origin: Option<OriginMode>, pub failover: Option<bool>,
}
Expand description

Per-field lenient WITH options for a Subscription.

Every field is Option<T>. None = unmanaged (pgevolve neither sets nor resets); Some(value) = managed (diff emits an ALTER to match). Matches the v0.3.3 reloptions per-field-lenient pattern.

CREATE-only fields: create_slot and copy_data are PG-CREATE-only (no ALTER SUBSCRIPTION s SET (create_slot = …) exists). They flow into the IR from source CREATE statements so users can declare them, but the differ NEVER includes them in AlterSubscriptionSetOptions deltas, and the catalog reader ALWAYS returns None for them (pg_subscription doesn’t store the CREATE-time decision). See diff::subscriptions::options_delta.

Fields§

§enabled: Option<bool>

Whether the subscription is enabled. PG default: true.

§slot_name: Option<Identifier>

Replication slot name on the publisher. None = use subscription name.

§create_slot: Option<bool>

Whether CREATE SUBSCRIPTION should create the publisher-side slot. PG default: true.

§copy_data: Option<bool>

Whether to copy existing rows during initial sync. PG default: true.

§synchronous_commit: Option<String>

synchronous_commit GUC value for the subscription’s apply worker. Free-form string (e.g., "on", "off", "remote_write", "local").

§binary: Option<bool>

Use binary copy / binary replication protocol. PG default: false.

§streaming: Option<StreamingMode>

Streaming mode for large in-progress transactions.

§two_phase: Option<bool>

Two-phase commit handling. PG 14+; default: false.

§disable_on_error: Option<bool>

Disable the subscription on apply error. PG 15+; default: false.

§password_required: Option<bool>

Whether the subscription owner must supply a password. PG 16+; default: true.

§run_as_owner: Option<bool>

Run the apply worker as the subscription owner (instead of the table owner). PG 16+; default: false.

§origin: Option<OriginMode>

Replication origin handling. PG 16+; default: Any.

§failover: Option<bool>

Whether the subscription survives failover. PG 17+; default: false.

Trait Implementations§

Source§

impl Clone for SubscriptionOptions

Source§

fn clone(&self) -> SubscriptionOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SubscriptionOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SubscriptionOptions

Source§

fn default() -> SubscriptionOptions

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for SubscriptionOptions

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for SubscriptionOptions

Source§

fn eq(&self, other: &SubscriptionOptions) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for SubscriptionOptions

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for SubscriptionOptions

Source§

impl StructuralPartialEq for SubscriptionOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,