"Extension"
- 1.6 延伸方向:Web UI、coding agent、產圖
日常路徑跑穩後可以玩的延伸:Open WebUI、aider、ComfyUI;先把基底跑穩再進階
- PostgreSQL Extension Ecosystem:把 PG 變成 vector DB / time-series / sharded 的 plugin 生態
PG 的 extension 機制不只是 plugin、是 *結構性產品線擴張* — pgvector 讓 PG 變 vector DB、TimescaleDB 變 time-series、Citus 變 sharded、PostGIS 變 GIS。本文走 PG extension lifecycle、6 個 production-critical extension(pg_stat_statements / pg_partman / pg_repack / pgvector / TimescaleDB / PostGIS)、5 production 踩雷(extension version 跟 PG version 對齊 / managed PG 限制 / upgrade order / shared_preload_libraries 衝突 / extension 跟 logical replication 互動)、cloud vendor 對 extension 的限制
- TimescaleDB Deep Dive:Hypertable / Continuous Aggregate / Compression 把 PG 變 Time-Series DB
TimescaleDB 是 PG extension(不是 fork)、用 *hypertable* 自動 partition by time、加 *continuous aggregate* 做 incremental materialized view、加 *compression* 對舊 chunk 壓 90%+、把 PG 變成 InfluxDB / Prometheus 級 time-series DB。本文走 hypertable 機制、continuous aggregate 跟普通 MV 差異、compression policy、retention policy、5 production 踩雷(chunk size 不對 / CAGG refresh 落後 / compression 後 update 限制 / hypertable 不能加 FK / TimescaleDB 跟 PG 主版本對齊)、跟 PG 原生 partitioning 對比
- pgvector Deep Dive:HNSW / IVFFlat 取捨跟跟專業 Vector DB 對比
pgvector 是 PG extension、加 *vector* type 跟兩種 ANN index(IVFFlat / HNSW)、把 PG 變成可用 vector DB。本文走 vector type + distance operator、IVFFlat vs HNSW 取捨(build time / recall / memory)、quantization 跟 dimension reduction、5 production 踩雷(dimension 超 2000 限制 / HNSW build 太慢 / IVFFlat 不重建 recall 漂移 / hybrid search 設計 / memory budget)、跟 Pinecone / Weaviate / Milvus 對比的決策框架
- PostGIS Deep Dive:Geometry / Geography 型別、GiST 空間索引跟 ST_* 函式生態
PostGIS 是 PG extension、加 *geometry* / *geography* 型別、GiST 空間索引跟 1000+ ST_* 函式、把 PG 變成功能完整 GIS DB(跟 Oracle Spatial / SQL Server geography 並列)。本文走 geometry vs geography 取捨、SRID 跟投影系統、GiST 空間索引機制、5 production 踩雷(geometry 用錯 SRID / geography 不能用所有 ST_ 函式 / GiST index 不對 ST_DWithin 生效 / cluster on geom 後 BRIN 失效 / EWKB vs WKB 跨工具相容)、GIS workload 的 PG vs 專業 GIS DB 對比