TritonDataCenter / pg_prefaulter

Faults pages into PostgreSQL shared_buffers or filesystem caches in advance of WAL apply
Apache License 2.0
56 stars 13 forks source link

Stream WAL information to a sidecar pg_prefaulter process via a bgworker... #23

Open sean- opened 7 years ago

sean- commented 7 years ago

It would be clever to hook in to PostgreSQL as a background worker. There are actually two candidate paths for this enhancement in the future:

  1. stream the WAL information over an RPC socket to a sidecar pg_prefaulter process
  2. outright convert pg_prefaulter into a background worker

The former has benefits because you could stop and upgrade the sidecar process without restarting PostgreSQL. The latter is more inline with the traditional monolithic C mindset. Given the low volume of RPCs, the former is probably preferred over the latter but additional investigation is required before making a determination.

Inspiration taken from: https://github.com/prest/bgworker