LogicalReplicationMessage

Enum LogicalReplicationMessage 

Source
pub enum LogicalReplicationMessage {
Show 19 variants Begin { final_lsn: XLogRecPtr, timestamp: TimestampTz, xid: Xid, }, Commit { flags: u8, commit_lsn: XLogRecPtr, end_lsn: XLogRecPtr, timestamp: TimestampTz, }, Relation { relation_id: Oid, namespace: String, relation_name: String, replica_identity: u8, columns: Vec<ColumnInfo>, }, Insert { relation_id: Oid, tuple: TupleData, }, Update { relation_id: Oid, old_tuple: Option<TupleData>, new_tuple: TupleData, key_type: Option<char>, }, Delete { relation_id: Oid, old_tuple: TupleData, key_type: char, }, Truncate { relation_ids: Vec<Oid>, flags: u8, }, Type { type_id: Oid, namespace: String, type_name: String, }, Origin { origin_lsn: XLogRecPtr, origin_name: String, }, Message { flags: u8, lsn: XLogRecPtr, prefix: String, content: Vec<u8>, }, StreamStart { xid: Xid, first_segment: bool, }, StreamStop, StreamCommit { xid: Xid, flags: u8, commit_lsn: XLogRecPtr, end_lsn: XLogRecPtr, timestamp: TimestampTz, }, StreamAbort { xid: Xid, subtransaction_xid: Xid, abort_lsn: Option<XLogRecPtr>, abort_timestamp: Option<TimestampTz>, }, BeginPrepare { prepare_lsn: XLogRecPtr, end_lsn: XLogRecPtr, timestamp: TimestampTz, xid: Xid, gid: String, }, Prepare { flags: u8, prepare_lsn: XLogRecPtr, end_lsn: XLogRecPtr, timestamp: TimestampTz, xid: Xid, gid: String, }, CommitPrepared { flags: u8, commit_lsn: XLogRecPtr, end_lsn: XLogRecPtr, timestamp: TimestampTz, xid: Xid, gid: String, }, RollbackPrepared { flags: u8, prepare_end_lsn: XLogRecPtr, rollback_end_lsn: XLogRecPtr, prepare_timestamp: TimestampTz, rollback_timestamp: TimestampTz, xid: Xid, gid: String, }, StreamPrepare { flags: u8, prepare_lsn: XLogRecPtr, end_lsn: XLogRecPtr, timestamp: TimestampTz, xid: Xid, gid: String, },
}
Expand description

Unified logical replication message enum

Variants§

§

Begin

Begin transaction

Fields

§final_lsn: XLogRecPtr
§timestamp: TimestampTz
§xid: Xid
§

Commit

Commit transaction

Fields

§flags: u8
§commit_lsn: XLogRecPtr
§end_lsn: XLogRecPtr
§timestamp: TimestampTz
§

Relation

Relation information (table schema)

Fields

§relation_id: Oid
§namespace: String
§relation_name: String
§replica_identity: u8
§columns: Vec<ColumnInfo>
§

Insert

Insert operation

Fields

§relation_id: Oid
§

Update

Update operation

Fields

§relation_id: Oid
§old_tuple: Option<TupleData>
§new_tuple: TupleData
§key_type: Option<char>
§

Delete

Delete operation

Fields

§relation_id: Oid
§old_tuple: TupleData
§key_type: char
§

Truncate

Truncate operation

Fields

§relation_ids: Vec<Oid>
§flags: u8
§

Type

Type information

Fields

§type_id: Oid
§namespace: String
§type_name: String
§

Origin

Origin information

Fields

§origin_lsn: XLogRecPtr
§origin_name: String
§

Message

Message (used for keepalive and custom messages)

Fields

§flags: u8
§prefix: String
§content: Vec<u8>
§

StreamStart

Streaming transaction start

Fields

§xid: Xid
§first_segment: bool
§

StreamStop

Streaming transaction stop

§

StreamCommit

Streaming transaction commit

Fields

§xid: Xid
§flags: u8
§commit_lsn: XLogRecPtr
§end_lsn: XLogRecPtr
§timestamp: TimestampTz
§

StreamAbort

Streaming transaction abort In protocol version 4 with parallel streaming, includes abort_lsn and abort_timestamp

Fields

§xid: Xid
§subtransaction_xid: Xid
§abort_lsn: Option<XLogRecPtr>

Abort LSN (only present in protocol v4 with parallel streaming)

§abort_timestamp: Option<TimestampTz>

Abort timestamp (only present in protocol v4 with parallel streaming)

§

BeginPrepare

Begin prepare message (protocol v3+)

Fields

§prepare_lsn: XLogRecPtr
§end_lsn: XLogRecPtr
§timestamp: TimestampTz
§xid: Xid
§

Prepare

Prepare message (protocol v3+)

Fields

§flags: u8
§prepare_lsn: XLogRecPtr
§end_lsn: XLogRecPtr
§timestamp: TimestampTz
§xid: Xid
§

CommitPrepared

Commit prepared message (protocol v3+)

Fields

§flags: u8
§commit_lsn: XLogRecPtr
§end_lsn: XLogRecPtr
§timestamp: TimestampTz
§xid: Xid
§

RollbackPrepared

Rollback prepared message (protocol v3+)

Fields

§flags: u8
§prepare_end_lsn: XLogRecPtr
§rollback_end_lsn: XLogRecPtr
§prepare_timestamp: TimestampTz
§rollback_timestamp: TimestampTz
§xid: Xid
§

StreamPrepare

Stream prepare message (protocol v3+)

Fields

§flags: u8
§prepare_lsn: XLogRecPtr
§end_lsn: XLogRecPtr
§timestamp: TimestampTz
§xid: Xid

Trait Implementations§

Source§

impl Clone for LogicalReplicationMessage

Source§

fn clone(&self) -> LogicalReplicationMessage

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for LogicalReplicationMessage

Source§

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

Formats the value using the given formatter. Read more

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> 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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more