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:
stream the WAL information over an RPC socket to a sidecar pg_prefaulter process
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.
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:
pg_prefaulter
processpg_prefaulter
into a background workerThe 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