~/talk

Global unique index a different approach

Talkat PGCon 2023 · 2023-05-30..06-02· [databases, distributed-systems]
links:none on file
slides:none on file

Patch implements a global unique index by keeping one index per partition but building a single long-lived spool and doing a global tape/merge sort to verify uniqueness; index uses btree with new relkind 'g'. It uses existing external sorting when maintenance_work_mem 64MB fills. Benchmarks show 6x slower on inserts for six partitions (26k → 156k ms) and ~35% slower index create for 6M rows, while selects on an 800M rows 1200 partitions test are orders of magnitude faster. Attach and concurrent inserts suffer locking and deadlock risks; workarounds proposed (per-partition min/max bounds, attach-concurrently style flow) but feature remains experimental.

AI-written summary · about

  1. 0:00Intro
  2. 1:35Few Words About Me: Cary
  3. 4:13Global Index - Benefit
  4. 8:43Global Unique Index - Syntax
  5. 10:43Global Unique Index - New Relkind
  6. 13:22How Global Unique Index
  7. 21:47Benchmark Number - SELECT Only Using Unique Column as Lookup Key
  8. 23:15Benchmark Number - SELECT + UPDATE
  9. 24:30Performance Impact Summary
  10. 31:32Global Unique Index - Possible Solution to ATTACH Lock Problems
  11. 33:41Global Unique Index - Summary
  12. 35:15Related Links
~/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.