> So how do we look at a generic log record, say "ok, the upstream that wrote > this says it needs to invoke registered generic xlog hook 42, which is > <func> from <extension> at <ptr>" ?
Record enough information in WAL that the rmgrs can have names instead of ID numbers. Stick the list of extension rmgrs in use into each checkpoint record and call it good.
Repeating the mapping at each checkpoint sounds pretty reasonable and means we always know what we need. There's no need to bloat each record with an extension name and no need for any kind of ugly global registration. The mapping table would be small and simple. I like it.
Of course, it's all maybe-in-future stuff at this point, but I think that's a really good way to approach it.
There's no way around the fact that user defined redo functions can affect reliability. But then, so can user-defined data types, functions, bgworkers, plpython functions loading ctypes, plpython functions getting creative in the datadir, and admins who paste into the wrong window. The scope for problems is somewhat greater but not IMO prohibitively so.