~/talk

Call me back, Postgres

Talkat RailsConf 2022 · 2022-05-17..05-19· [databases, ruby-on-rails]
slides:none on file

Shows that Postgres triggers + listen/notify replace fragile ActiveRecord callbacks and polling for cross‑consumer sync by putting callbacks in the database, emitting PG_NOTIFY payloads, and running a separate Ruby listener with wait_for_notify. Describes writing SQL functions and migrations (structure.sql), a trigger log pending→synced retry pattern, and tactics to avoid loops such as disable triggers during sync. Implements as a Heroku dyno/rake worker and reports it works for a Salesforce/Heroku Connect/legacy PHP integration.

AI-written summary · about

  1. 0:00Start
  2. 1:42Main Players
  3. 3:16Key Connections
  4. 10:03PG Triggers
  5. 11:19Define a Function
  6. 12:56Apply Trigger Function
  7. 19:12Using Rails Migrations
  8. 21:42Syncing Process Design
  9. 22:42Maintaining a Connection
  10. 23:49Logging Triggers
  11. 25:37Avoiding Continuous Trigger Loops
  12. 27:53Solving for Edge Cases
~/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.