Thread: pgsql: Make logical decoding a part of the rmgr.

pgsql: Make logical decoding a part of the rmgr.

From
Jeff Davis
Date:
Make logical decoding a part of the rmgr.

Add a new rmgr method, rm_decode, and use that rather than a switch
statement.

In preparation for rmgr extensibility.

Reviewed-by: Julien Rouhaud
Discussion: https://postgr.es/m/ed1fb2e22d15d3563ae0eb610f7b61bb15999c0a.camel%40j-davis.com
Discussion: https://postgr.es/m/20220118095332.6xtlcjoyxobv6cbk@jrouhaud

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7a5f6b47488d824b1ea1326be4337e2c32325ff2

Modified Files
--------------
src/backend/access/transam/rmgr.c        |   5 +-
src/backend/replication/logical/decode.c | 105 +++++++------------------------
src/bin/pg_rewind/parsexlog.c            |   2 +-
src/bin/pg_waldump/rmgrdesc.c            |   2 +-
src/include/access/rmgr.h                |   2 +-
src/include/access/rmgrlist.h            |  44 ++++++-------
src/include/access/xlog_internal.h       |   5 ++
src/include/replication/decode.h         |  16 ++++-
8 files changed, 69 insertions(+), 112 deletions(-)