PostgreSQL 9.6 error: invalid resource manager ID I am encountering error messages like this in a PostgreSQL 9.6 server log file (while experimenting with pg_rewind):

LOG: invalid resource manager ID 119 at 0/910CE68


What is a (PostgreSQL) resource manager and why does it have to by identified in a WAL file?
I have by now concluded that this is a symptom of PostgreSQL encountering malformed WALs. These error messages also seem related:

LOG: invalid record length ...
LOG: record with incorrect prev-link ...


The root cause was apparently that a call to pg_basebackup -X stream did not terminate. (This was apparently an issue titled "pg_basebackup -x stream from the standby gets stuck if there is no traffic in the database" that was resolved in PostgreSQL 9.2, but may have cropped up again.) When I had to interrupt the call with CTRL-C, this may have left malformed WALs.

I am now using pg_basebackup -c fast -X fetch instead, and this works fine. Given that and for my current purposes, it is no longer necessary to understand details around (PostgreSQL) resource managers.