2026-06-16 | database · kernel | #postgresql #pg-kernel #logical-replication #logical-decoding #reorder-buffer #pgoutput #publication #subscription #decode #conflict-detection #replication-slot #wal
拆解 PostgreSQL 逻辑复制的完整内核路径:LogicalDecodingContext 从 WAL 解码出逻辑变更的内部流程、Reorder Buffer 按 COMMIT 顺序重排事务与 snapshot 重建机制、pgoutput 输出插件的二进制协议与行过滤变换、Publication/Subscription 模型的内核实现。重点剖析四种冲突类型的根因与修复边界——update_missing/delete_missing 为什么静默跳过而 duplicate_key 直接停摆、subscription 被 disable 后的数据追平策略、序列不在逻辑复制范围内的自增主键冲突陷阱、大事务在 reorder buffer 中的延迟放大效应。
2026-04-22 | architecture · fintech | #billing #subscription #metering #usage-based #invoice #vat #gst #sales-tax #stripe-billing #saas #dunning
SaaS 与云服务的订阅与用量计费工程实践:计费模型、计量(Metering)、订阅生命周期、账单与发票、dunning、出海税务(VAT/GST/sales tax/消费税)、定价引擎与数据模型。