pub struct PostgresCdcReaderConfig {Show 14 fields
pub batch: Option<PostgresCdcBatchConfig>,
pub memory_backpressure: Option<PostgresCdcMemoryBackpressureConfig>,
pub publication: String,
pub run_source_migrations: bool,
pub source_table: String,
pub ssl_ca_location: Option<String>,
pub ssl_ca_pem: Option<String>,
pub ssl_certificate_chain_location: Option<String>,
pub ssl_client_key: Option<String>,
pub ssl_client_key_location: Option<String>,
pub ssl_client_location: Option<String>,
pub ssl_client_pem: Option<String>,
pub uri: String,
pub verify_hostname: Option<bool>,
}Expand description
Postgres CDC input connector configuration.
Uses logical replication to capture ongoing changes from a Postgres database.
Requires a pre-created publication. Automatic source migrations require a
superuser; with administrator-installed source objects and
run_source_migrations = false, a replication role with the documented
source-table and etl state-store privileges can be used instead.
Tables must have primary keys and REPLICA IDENTITY FULL is recommended
for UPDATE/DELETE support.
JSON schema
{
"description": "Postgres CDC input connector configuration.\n\nUses logical replication to capture ongoing changes from a Postgres database.\nRequires a pre-created publication. Automatic source migrations require a\nsuperuser; with administrator-installed source objects and\n`run_source_migrations = false`, a replication role with the documented\nsource-table and etl state-store privileges can be used instead.\nTables must have primary keys and `REPLICA IDENTITY FULL` is recommended\nfor UPDATE/DELETE support.",
"allOf": [
{
"description": "TLS/SSL configuration for PostgreSQL connectors.",
"type": "object",
"properties": {
"ssl_ca_location": {
"description": "Path to a file containing a sequence of CA certificates in PEM format.",
"type": [
"string",
"null"
]
},
"ssl_ca_pem": {
"description": "A sequence of CA certificates in PEM format.",
"type": [
"string",
"null"
]
},
"ssl_certificate_chain_location": {
"description": "The path to the certificate chain file.\nThe file must contain a sequence of PEM-formatted certificates,\nthe first being the leaf certificate, and the remainder forming\nthe chain of certificates up to and including the trusted root certificate.",
"type": [
"string",
"null"
]
},
"ssl_client_key": {
"description": "The client certificate key in PEM format.",
"type": [
"string",
"null"
]
},
"ssl_client_key_location": {
"description": "Path to the client certificate key.",
"type": [
"string",
"null"
]
},
"ssl_client_location": {
"description": "Path to the client certificate.",
"type": [
"string",
"null"
]
},
"ssl_client_pem": {
"description": "The client certificate in PEM format.",
"type": [
"string",
"null"
]
},
"verify_hostname": {
"description": "True to enable hostname verification when using TLS. True by default.\n\nWhen false, the certificate chain is still verified against the\ntrusted CA; only the requirement that the server name appears in the\ncertificate is lifted.",
"type": [
"boolean",
"null"
]
}
}
},
{
"type": "object",
"required": [
"publication",
"source_table",
"uri"
],
"properties": {
"batch": {
"$ref": "#/components/schemas/PostgresCdcBatchConfig"
},
"memory_backpressure": {
"$ref": "#/components/schemas/PostgresCdcMemoryBackpressureConfig"
},
"publication": {
"description": "Name of the pre-created Postgres publication to replicate from.",
"type": "string"
},
"run_source_migrations": {
"description": "Whether the connector runs etl's source migrations on startup.\n\nThe source migrations install the schema helper functions and the\n`ddl_command_end` event trigger. Creating the event trigger requires a\nsuperuser, so a de-elevated role can set this to `false` and have an\nadministrator install the source objects out-of-band. Disabling this\ndoes not skip the state-store migrations, which run on every start\nregardless.\n\nDefault: `true`.",
"default": true,
"type": "boolean"
},
"source_table": {
"description": "Postgres table to replicate, schema-qualified (e.g. \"public.orders\").\nA name given without a schema refers to a table in \"public\".\nMust be included in the publication.",
"type": "string"
},
"uri": {
"description": "Postgres connection URI. Automatic source migrations require a superuser.\nWith `run_source_migrations = false`, the user needs REPLICATION and the\ngrants described in [Running as a non-superuser](https://docs.feldera.com/connectors/sources/postgresql-cdc#running-as-a-non-superuser).\nSee: <https://docs.rs/tokio-postgres/0.7.12/tokio_postgres/config/struct.Config.html>",
"type": "string"
}
}
}
]
}Fields§
§batch: Option<PostgresCdcBatchConfig>§memory_backpressure: Option<PostgresCdcMemoryBackpressureConfig>§publication: StringName of the pre-created Postgres publication to replicate from.
run_source_migrations: boolWhether the connector runs etl’s source migrations on startup.
The source migrations install the schema helper functions and the
ddl_command_end event trigger. Creating the event trigger requires a
superuser, so a de-elevated role can set this to false and have an
administrator install the source objects out-of-band. Disabling this
does not skip the state-store migrations, which run on every start
regardless.
Default: true.
source_table: StringPostgres table to replicate, schema-qualified (e.g. “public.orders”). A name given without a schema refers to a table in “public”. Must be included in the publication.
ssl_ca_location: Option<String>Path to a file containing a sequence of CA certificates in PEM format.
ssl_ca_pem: Option<String>A sequence of CA certificates in PEM format.
ssl_certificate_chain_location: Option<String>The path to the certificate chain file. The file must contain a sequence of PEM-formatted certificates, the first being the leaf certificate, and the remainder forming the chain of certificates up to and including the trusted root certificate.
ssl_client_key: Option<String>The client certificate key in PEM format.
ssl_client_key_location: Option<String>Path to the client certificate key.
ssl_client_location: Option<String>Path to the client certificate.
ssl_client_pem: Option<String>The client certificate in PEM format.
uri: StringPostgres connection URI. Automatic source migrations require a superuser.
With run_source_migrations = false, the user needs REPLICATION and the
grants described in Running as a non-superuser.
See: https://docs.rs/tokio-postgres/0.7.12/tokio_postgres/config/struct.Config.html
verify_hostname: Option<bool>True to enable hostname verification when using TLS. True by default.
When false, the certificate chain is still verified against the trusted CA; only the requirement that the server name appears in the certificate is lifted.
Implementations§
Source§impl PostgresCdcReaderConfig
impl PostgresCdcReaderConfig
pub fn builder() -> PostgresCdcReaderConfig
Trait Implementations§
Source§impl Clone for PostgresCdcReaderConfig
impl Clone for PostgresCdcReaderConfig
Source§impl Debug for PostgresCdcReaderConfig
impl Debug for PostgresCdcReaderConfig
Source§impl<'de> Deserialize<'de> for PostgresCdcReaderConfig
impl<'de> Deserialize<'de> for PostgresCdcReaderConfig
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>,
Source§impl From<&PostgresCdcReaderConfig> for PostgresCdcReaderConfig
impl From<&PostgresCdcReaderConfig> for PostgresCdcReaderConfig
Source§fn from(value: &PostgresCdcReaderConfig) -> Self
fn from(value: &PostgresCdcReaderConfig) -> Self
Source§impl From<PostgresCdcReaderConfig> for PostgresCdcReaderConfig
impl From<PostgresCdcReaderConfig> for PostgresCdcReaderConfig
Source§fn from(value: PostgresCdcReaderConfig) -> Self
fn from(value: PostgresCdcReaderConfig) -> Self
Source§impl Serialize for PostgresCdcReaderConfig
impl Serialize for PostgresCdcReaderConfig
Source§impl TryFrom<PostgresCdcReaderConfig> for PostgresCdcReaderConfig
impl TryFrom<PostgresCdcReaderConfig> for PostgresCdcReaderConfig
Source§type Error = ConversionError
type Error = ConversionError
Source§fn try_from(value: PostgresCdcReaderConfig) -> Result<Self, ConversionError>
fn try_from(value: PostgresCdcReaderConfig) -> Result<Self, ConversionError>
Auto Trait Implementations§
impl Forget for PostgresCdcReaderConfig
impl Freeze for PostgresCdcReaderConfig
impl Move for PostgresCdcReaderConfig
impl RefUnwindSafe for PostgresCdcReaderConfig
impl Send for PostgresCdcReaderConfig
impl Sync for PostgresCdcReaderConfig
impl Unpin for PostgresCdcReaderConfig
impl UnsafeUnpin for PostgresCdcReaderConfig
impl UnwindSafe for PostgresCdcReaderConfig
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>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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