Struct dataflow::source::PostgresSourceReader[][src]

pub struct PostgresSourceReader {
    source_name: String,
    connector: PostgresSourceConnector,
    lsn: PgLsn,
    metrics: PgSourceMetrics,
}
Expand description

Information required to sync data from Postgres

Fields

source_name: String

Used to produce useful error messages

connector: PostgresSourceConnectorlsn: PgLsn

Our cursor into the WAL

metrics: PgSourceMetrics

Implementations

Constructs a new instance

Creates the replication slot and produces the initial snapshot of the data

After the initial snapshot has been produced it returns the name of the created slot and the LSN at which we should start the replication stream at.

Reverts a failed snapshot by deleting any processed rows from the dataflow.

Converts a Tuple received in the replication stream into a Row instance. The logical replication protocol doesn’t use the binary encoding for column values so contrary to the initial snapshot here we need to parse the textual form of each column.

The old_tuple argument can be used as a source of data to use when encountering unchanged TOAST values.

Trait Implementations

The top-level control of the state machine and retry logic

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

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

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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