~/talk

Sharding PostgreSQL using Foreign Data Wrappers

Talkat PGConf NYC 2022 · 2022-09-22..09-23· [databases, data-engineering]
links:none on file
slides:none on file

Shows how to shard PostgreSQL using postgres_fdw and declarative partitioning, with concrete features and limits: join/aggregate/order-by pushdown, partition-wise joins, parallel foreign scans, bulk insert batching and parallel commits (PG15), plus connection pooling and automatic reconnect. It supports full DML (insert/update/delete) but lacks safe global 2PC and deadlock detection, so partial commits and prepared-transaction recovery require an external coordinator or Citus/ShardingSphere. Notes practical gotchas: default fetch_size=1, search_path reset to pg_catalog, and remote-repeatable-read snapshot semantics.

AI-written summary · about

  1. 0:00Introduction to sharding
  2. 3:27Understanding SQL/MED and FDW
  3. 5:57Business use cases
  4. 8:40Postgres FDW mechanics
  5. 11:03Optimizer and performance
  6. 18:51Query optimization tuning
  7. 23:57Implementation examples
  8. 28:02Transaction management
  9. 34:41MVCC and data consistency
  10. 40:16Alternative sharding tools
  11. 43:15Q&A and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.