pub enum PostgresWriteMethod {
Insert,
Copy,
}Expand description
How rows are shipped to PostgreSQL in append mode.
Variants§
Insert
Multi-row INSERT INTO … VALUES … — the default. Works with every
write mode and the exactly-once transaction path.
Copy
COPY … FROM STDIN (FORMAT text) bulk load — typically 5–10×
faster than multi-row INSERT for bulk append (issue #308).
Append-only: COPY has no ON CONFLICT, so combining
write_method: copy with write_mode: upsert|delete is rejected at
config load. The exactly-once path (write_batch_idempotent) always
uses the INSERT/transaction path regardless of this setting — the
watermark token must commit atomically with the page’s data.
Error semantics are all-or-nothing per batch, the same as a failed
multi-row INSERT: one bad row fails the whole COPY and the DLQ
router’s on_batch_error policy applies.
Trait Implementations§
Source§impl Clone for PostgresWriteMethod
impl Clone for PostgresWriteMethod
Source§fn clone(&self) -> PostgresWriteMethod
fn clone(&self) -> PostgresWriteMethod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PostgresWriteMethod
Source§impl Debug for PostgresWriteMethod
impl Debug for PostgresWriteMethod
Source§impl Default for PostgresWriteMethod
impl Default for PostgresWriteMethod
Source§fn default() -> PostgresWriteMethod
fn default() -> PostgresWriteMethod
Source§impl<'de> Deserialize<'de> for PostgresWriteMethod
impl<'de> Deserialize<'de> for PostgresWriteMethod
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for PostgresWriteMethod
Source§impl JsonSchema for PostgresWriteMethod
impl JsonSchema for PostgresWriteMethod
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for PostgresWriteMethod
impl PartialEq for PostgresWriteMethod
Source§impl Serialize for PostgresWriteMethod
impl Serialize for PostgresWriteMethod
impl StructuralPartialEq for PostgresWriteMethod
Auto Trait Implementations§
impl Freeze for PostgresWriteMethod
impl RefUnwindSafe for PostgresWriteMethod
impl Send for PostgresWriteMethod
impl Sync for PostgresWriteMethod
impl Unpin for PostgresWriteMethod
impl UnsafeUnpin for PostgresWriteMethod
impl UnwindSafe for PostgresWriteMethod
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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