anchor.diff:  
   
   
  -// Type: assembly
  +// Type: reference
   // ModuleID: how-debezium-postgresql-connectors-handle-faults-and-problems
   // Title: How {prodname} PostgreSQL connectors handle faults and problems
   [[postgresql-when-things-go-wrong]]
  
positive.code: // Type: assembly
  [id="debezium-connector-for-postgresql"]
  = {prodname} connector for PostgreSQL
  
  :product: true
  
  ifdef::community[]
  
  
negative.code: 
  * link:https://access.redhat.com/products/red-hat-amq#streams[Red Hat AMQ Streams] was used to set up and start running Apache Kafka and Kafka Connect on OpenShift. AMQ Streams offers operators and images that bring Kafka to OpenShift. 
  
  * Podman or Docker is installed.
  
  * You have an account and permissions to create and manage containers in the container registry (such as `quay.io` or `docker.io`) to which you plan to add the container that will run your Debezium connector. 
  
  .Procedure
  
  . Create the {prodname} PostgreSQL container for Kafka Connect: 
  .. Download the {prodname} link:https://access.redhat.com/jbossnetwork/restricted/listSoftware.html?product=red.hat.integration&downloadType=distributions[PostgreSQL connector archive].
  
  .. Extract the {prodname} PostgreSQL connector archive to create a directory structure for the connector plug-in, for example: 
  +
  [subs="+macros"]
  ----
  ./my-plugins/
  ├── debezium-connector-postgresql
  │   ├── ...
  ----
  
  .. Create a Docker file that uses `{DockerKafkaConnect}` as the base image. 
  For example, from a terminal window, enter the following:
  +
  [subs="+macros,+attributes"]
  ----
  pass:quotes[*cat <<EOF >debezium-container-for-postgresql.yaml*] // <1>
  pass:quotes[*FROM {DockerKafkaConnect}*]
  pass:quotes[*USER root:root*]
  pass:quotes[*COPY ./my-plugins/ /opt/kafka/plugins/*] // <2>
  pass:quotes[*USER 1001*]
  pass:quotes[*EOF*]
  ----
  <1> You can specify any file name that you want.
  <2> Replace `my-plugins` with the name of your plug-ins directory.
  
  The command creates a Docker file with the name `debezium-container-for-postgresql.yaml` in the current directory.
  
  .. Build the container image from the `debezium-container-for-postgresql.yaml` Docker file that you created in the previous step. From the directory that contains the file, run the following command:
  +
  [source,shell,options="nowrap"]
  ----
  podman build -t debezium-container-for-postgresql:latest .
  ----
  +
  This command builds a container image with the name `debezium-container-for-postgresql`. 
  
  .. Push your custom image to a container registry such as `quay.io` or any internal container registry. Ensure that this registry is reachable from your OpenShift instance. For example:
  +
  [source,shell,options="nowrap"]
  ----
  podman push debezium-container-for-postgresql:latest
  ----
  
  .. Create a new {prodname} PostgreSQL `KafkaConnect` custom resource (CR). For example, create a `KafkaConnect` CR with the name `dbz-connect.yaml` that specifies `annotations` and `image` properties as shown in the following example:
  +
  [source,yaml,subs="+attributes"]
  ----
  