pgcapture - 介紹與示範

上次我們講到如何透過 pgoutput plugin 加上 pgx 來實作我們自己的 CDC 功能,但是其缺點是無法複製 DDL 且直到 pg 14 才支援 pgoutput 有 binary format 的功能。
因此今天來介紹我前同事開發的 pgcapture 是如何去解決以上提到的兩個缺點的,且如何使用。
上次我們講到如何透過 pgoutput plugin 加上 pgx 來實作我們自己的 CDC 功能,但是其缺點是無法複製 DDL 且直到 pg 14 才支援 pgoutput 有 binary format 的功能。
因此今天來介紹我前同事開發的 pgcapture 是如何去解決以上提到的兩個缺點的,且如何使用。
上一篇文章我們知道 logical decoding 的概念,這次我們來示範如何用 golang + pgx 來實現 CDC 的效果。我們知道從 Postgres 10 開始支援用 pub & sub 這種 logical replication 的方式,因此也提供 pgoutput 的 plugin 來實現 logical decoding。
因此這邊文章是使用 pgoutput + golang client 實現 logical replication 進而實現捕捉 CDC Event 的效果。
延續上次 Postgres Stream Replication 的筆記,這次來講講 pgpool-ll,這個東西可以想成是 postgres 的 proxy,並且可以做到 load balance 的效果。
在升級 Postgres 的版本之前,如果你的 Postgres 前面有掛 pgpool-ll,那麼升級後,就必須去更改 pgpool-ll 的設定,因此這邊決定會先來幾篇文章講講 pgpool-ll 的相關設定。
今年是 2023 年,想說來回顧一下,去年 2022 年的寫筆記到現在的回顧。
上次提到 pg_upgrade 可以快速 upgrade 單台的 Postgres Server,最後結尾有提到要如何針對 PG Cluster 做升級。這篇先不講,先來記錄一下如何快速在 PG 建立起 cluster 並且採用 physical replication。
這樣下篇文章才可以來講講如何快速針對 PG Cluster 做升級。
最近在研究如何快速對 Postgres 進行升版,之前有聽過透過 Logical Replication 的方式來進行升版,但後來發現 Postgres 官方有推出 pg_upgrade 工具可以 in place 的快速升級 Postgres,並且保證盡可能向下相容,且支援跨主版本的升級。
因此這篇文章就來講講 pg_upgrade 這個工具怎麼使用。
在今年 2022 Google I/O 上, Google 宣佈了新的 AlloyDB For Postgres 新產品,AlloyDB 是與 Postgres 完全相容的 database,是拿 Postgres 的 Source Code 加以改良性能,使得可以應付 enterprise-grade transactional and analytical workloads。
該篇文章的筆記是來自於閱讀 AlloyDB intelligent, database-aware storage 與 AlloyDB Columnar engine 兩篇文章的。
今天來講講 Google Cloud 之前發布的一系列文章:Kubernetes best practices,我也是無意中看到,但我覺得寫得滿好的,也是值得筆記的。這篇文章的主題是關於為什麼 build small container images 這件事情很重要且它的好處是什麼。
以下的 build image 的 example 都放在 GitHub 上:https://github.com/KennyChenFight/build-small-image